command to check size of folder in linux

C++
du -sh /vardu -hs * | sort -rhdu -lh --max-depth=1 --block-size=M | sort -nr
Source

Also in C++: