Operating system Linux How to find the biggest files under linux system?
Notice: Undefined variable: relatedArticlesCount in /home/wwwroot/codeback.net/plugins/content/tags.php on line 149

How to find the biggest files under linux system?

How to find the biggest files under linux system? You may think why we need this function, if you have a limit space and need to free some space for your new documents you will find this is really useful. Because when you have a number of files, you will not know what files should be deleted at first, if you have some large files (such as audio/video clips) inside and you may want to get rid of, this function will be important, for you can find out which is the largest file and the delete it at first.

You can find the biggest files in the current directory with:

ls -lSrh

The "r" causes the large files to be listed at the end and 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

Ok, let us see again the command line:

ls -lSrh
ls -lSrh *.mp*
du -kx | egrep -v "\./.+/" | sort -n

Remember, there are two commands we are using: "ls" and "du". To search a certain file type, we use the parameter like "*.mp*".


Operating system - Linux