How to find the biggest files or directories on the server?

Just had a client call me due to the fact all the sites on his server were down.

A quick check on disk space and the hard disk was full. This is always the first thing to check when the server is up but sites are down.

I then check each of the root folders in turn to find out which one is causing the problem. This command is so useful and I have been using it for years or variations that I thought I would post just in case.

du -Sh | sort -rh | head -n 5

I always check /var first as this has logs, mail and lots more in it.

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.