Finding large files in Linux Print

  • 0

Suddenly you've found that your servers' disk is 90% full but have no idea where all the space went? Fear not, we'll help you get back on track.

First, let's change to the root directory or wherever you suspect the largest files are stored, eg:

cd /

cd /home

Now, let's run a command that will list all files larger than 100MB in size:

find . -xdev -type f -size +100M -print | xargs ls -lh | sort -k5,5 -h -r | head

 

Alternate command that some users might find runs faster:

find -type f -printf '%s %p\n' | sort -nr | head -100

Was this answer helpful?

« Back