List directories size with the command line

Get a size sorted list of directories and their estimated size (file space usage) in linux (in my case Ubuntu).

Command

You can customize how deep you want to go, in the case below only first level folders will be listed.

du -h --max-depth=1 | sort -hr

Sample output

921M . 128M ./02 102M ./03 93M ./01 90M ./06 88M ./05 81M ./04 74M ./09 71M ./11 70M ./12 53M ./10 43M ./07 32M ./08

Leave a Reply

Add <code> Some Code </code> by using this tags.

*
*