Sometimes we want to have a quick check the size of a specific directory in your current place from the terminal where you are working. Instead of opening Finder application – a common and unique file explorer on Mac, this need can be done by running the following command
du -sh <directory>
You can learn this command by running man du to see the other options as well as other usages. To remember this command, actually, du is short for « display disk usage statistics ».

If we don’t indicate a directory and -sh, the command will display the size of all directories recursively which are including all children directories. The size shows in bytes.

Hopefully, these tricks would bring a convenient way for you to check a directory’s size.
All constructive comments are welcomed. If you are willing to contribute financial support for our website, please follow the instructions below.
