There are 10 types of people: those who speak binary, and those who don't.

Recursive dir sizing quickie

Written by Eric Schwimmer

If you want to get the on-disk size of all entries in a directory (both files and subdirectories), and have it sorted and pretty-printed, run this:

du -s * | sort -rn | numfmt --from-unit=1K --to=si --round=nearest --padding=4

comments powered by Disqus