Finding the biggest files in Linux


A common problem with computers is when you have a number of large files (such as audio/video clips) that you may want to get rid of. You can find the biggest files in the current directory with: ( only in current directory )

ls -lSrh (the r causes the large files to be listed at the end, the h gives human readable output (MB and such))

You could also search for the biggest MP3/MPEGs:

ls -lSrh *.mp*

You can also look for the largest directories with:

du -kx | egrep -v “\./.+/” | sort -n

You can find the biggest files in your home directory, ( in the whole directory structure ).

find ~ -type f -exec ls -s {} \; | sort -n

List only the top 10 biggest file.

find . -type f -exec ls -s {} \; | sort -nr | head -10

Read full story

One thought on “Finding the biggest files in Linux

Leave a comment