How to get total folder / directory size with Linux
May 16th, 2009
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 a single number in human readable form (eg 8.2G). I have found this very useful for finding where all my disk space has gone.
du -h | grep -v '/' | awk '{print $1}'
February 25th, 2010 at 12:10 am
Is there a difference between the above command and the command: ‘du -hs’ (no quotes) in terms of output?
February 25th, 2010 at 5:26 am
Not a major amount.