Archive for January, 2009

Counting Folder or Directory Size in Linux CLI

If you use GUI, you can right-click the file or folder or directories to know the size, now how can you do that in command line interface (CLI)? Just type:

du -sh path/to/your/folder

That’s it, it’s very simple. option ’s’ means only display summary and option ‘h’ means display size in human-readable format, for example 1Mb instead of 1012023. Try and experiment with other paramaters, such as –max-depth, etc.

Leave a Comment