linux get recursive directory size

C++
du -sh /path/to/directory

Source

Also in C++: