How to find large files Linux

Find large files in Linux

Files in Linux can be found in many different ways but trying to find large files Linux is always been an interesting one. We will be using find tool to determine large files Linux. Most Linux users use the find tool to search for files but we will be using differently. In our how to find large files Linux guide we will cover different scenarios on how you can apply that your command line.

Find large files Linux

List all large Files in Linux

We will take try to find all files over 100,000KB (100MB or over) in size and display their names. Searching the entire Linux file system can take a long time and so it’s best to target specific folder to find large files Linux.

Following syntax is used in RedHat / CentOS / Fedora Linux :

find {/path/directory/} -type f -size +{size-in-kb}k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'

You can find big files in Linux (over 100MB) in current working directory:

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

In case you wanted to search in another directory the following example will go through /var/log directory to find big files Linux.

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

You  can increase the file size threshold as you wish to limit the results to find large files Linux.

Some traditional methods can also be used:
du -c | sort -n

Following command is used for Debian / Ubuntu Linux

find {/path/directory} -type f -size +{file-size-in-kb}k -exec ls -lh {} \; | awk '{ print $8 ": " $5 }'

To find large files Linux in current directory:
find . -type f -size +10000k -exec ls -lh {} \; | awk '{ print $8 ": " $5 }'

Some of the incoming search terms: Large files Linux, big files Linux, find large files or search for large files linux

Add a Comment