folder sixe in linux

C++
du -lh --max-depth=1 --block-size=M | sort -nrdu -h --max-depth=1
Source

Also in C++: