How to find large files on Linux

0
Want create site? Find Free WordPress Themes and plugins.

Linux

When you are running out of disk space sometimes you need to search your server to see which files are the ones that are consuming all the disk. And here comes the question, How to find large files on Linux?

First let me tell you that there is not a single command to do this, you can use multiple solutions, however I will show you the most quick and easy ones I use to find and list large files on Linux.

Find large files on Fedora / CentOS / RHEL

Search for big files (50MB or more) on your current directory:

find ./ -type f -size +50000k -exec ls -lh {} ; | awk '{ print $ 9 ": " $ 5 }'

Output:

 [[email protected]:~]pwd /home  [[email protected]:~]find . -type f -size +50000k -exec ls -lh {} ; | awk '{ print $ 9 ": " $ 5 }' ./user1/tmp/analog/cache: 79M ./syscall8/public_html/wp.zip: 146M ./bob54/public_html/adserver/var/debug.log: 86M ./marqu35/logs/adserver.site.com-May-2014.gz: 70M ./astrolab72/tmp/analog/cache: 75M

Search in my /var directory for 80MB or max file size:

find /var -type f -size +80000k -exec ls -lh {} ; | awk '{ print $ 9 ": " $ 5 }'

Find large files on Debian / Ubuntu Linux

Search in current directory:

find ./ -type f -size +10000k -exec ls -lh {} ; | awk '{ print $ 8 ": " $ 5 }'

Search the /home directory:

find /home -type f -size +10000k -exec ls -lh {} ; | awk '{ print $ 8 ": " $ 5 }'

If you know other ways to quickly find large files on Linux please share it with us.

Did you find apk for android? You can find new Free Android Games and apps.

You might also like More from author