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

Advertisements

One thought on “Finding the biggest files in Linux

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s