Low Orbit Flux Logo 2 D

Linux How To Get Size Of Directory

Linux provides easy to use command line tools to find the size of a directory. Check our other guide for more detailed information Linux How to Check Disk Space.

You can find the size of a directory on Linux like this:


du -sh /home/user1

If you don’t have permission to the directory or some of the contents you can use sudo to avoid errors and get the result you want.


sudo du -sh /var
-s summary for entire directory
-h human readable (display size in K, M, G, etc.