How to get total folder / directory size with Linux

Elioth Gruner - Spring Frost (1919)

If you want to know how much disk space is being used by a directory (including all the sub-directories) then you can use the following command. It will output the total in human-readable form (e.g. 8.2G), followed by the directory name. I have found this very useful for finding where all my disk space has gone.

du -sh .

Filed under Server Admin

2 comments

  1. Is there a difference between the above command and the command: ‘du -hs’ (no quotes) in terms of output?

Leave a comment

Your email address will not be published. Required fields are marked *