Useful linux search commands

Sometimes it comes handy to have some commands that help you find big files, like it happened to me at work, the server was full, control mysql was down due to that, imagine almos 50 websites not working..

Search for bigger files on all subdirectories

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

this one is another command that does something similar, but on all disk

du --max-depth=7 /* | sort -n

or

du --max-depth=7 /* -h | sort -n

To have a human readable size value.

 

Posted in Code Tricks, Server management and tagged , , , , .

Leave a Reply

Your email address will not be published. Required fields are marked *

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