Linux: Find out whats using up your file system with these handy commands

Alas, there are so many good sites already that give you every kind of command line tip available for Linux. So why would I also post them? For absolutely no good reason that’s why!

I am betting you will have a better way, and that’s OK by me. Post it.

Here we go…

How can I see the top 10 largest directories in Linux? Try:

du -hsx * | sort -rh | head -10

Note the h option to sort may not work for you. This will give you human readable sizes.

How can I see what is using up my inodes? Try:

for i in `find . -type d `; do echo `ls -a $i | wc -l` $i; done | sort -n