Finding large files in Linux.

I have a couple of web servers and the disc keeps filling.  I know, manager them!  Here is a little trick to find the large offenders if you are going through the same thing.

# du -a /var | sort -n -r | head -n 10

That line will show you the top 10 largest file/directories is taking up the most space in a /var directory/file system.  If you want to search other directories, just modify the /var path to the path you wish to search.

Hope it helps someone!


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Leave a Reply

You must be logged in to post a comment.