how to check folder size in linux

C++
du -h --max-depth=1# show all folder size in the current directory
du -h --max-depth=1du -sh /home/george
2.1G    /home/george
du -lh --max-depth=1 --block-size=M | sort -nrsudo du -sh /vardu -sh /home/george
Source

Also in C++: