How To Find And List Files Bigger Or Smaller Than Specific Size In Linux

This tutorial will explore a list of helpful disk space usage command lines in Linux, with examples of use for each command line.

How To Find And List Files Bigger Than 100mb In Linux

If you wish to find all files over 100M and to see where they are located and what is their size:

find . -type f -size +100M -exec ls -lh {} \;

I searched files over 100MB in my public_html directory in my below example.

[zalvis@rs-syd public_html]$ find . -type f -size +100M -exec ls -lh {} \;

-rw-r--r-- 1 zalvis zalvis 126M Apr  1 17:23 ./screemcast.mov

Command-line and each parameter are explained here.

You can use size switch for other formats, such as

  • “c” for bytes
  • “w” for two-byte words
  • “k” for Kilobytes
  • “M” for Megabytes
  • “G” for Gigabytes

How To Find And List Files Bigger Than 1GB In Linux

For example, to find files that are bigger than 1GB, use the following command:

find . -type f -size +1G -exec ls -lh {} \;

How To Find And List Files Smaller Than 100mb In Linux

If you wish to find all files under 100M and to see where they are located and what is their size:

find . -type f -size -100M -exec ls -lh {} \;

In my below example, I searched files over 100MB in my public_html directory.

[zalvis@rs-syd public_html]$ find . -type f -size -100M -exec ls -lh {} \;

-rw-r--r-- 1 zalvis zalvis 56M Apr  1 17:23 ./screemcast.mov

Command-line and each parameter explained here.

You can use size switch for other formats, such as

  • “c” for bytes
  • “w” for two-byte words
  • “k” for Kilobytes
  • “M” for Megabytes
  • “G” for Gigabytes

How To Find And List Files Smaller Than 1GB In Linux

For example, to find files which are smaller than 1GB, use the following command:

find . -type f -size -1G -exec ls -lh {} \;

How To Find And List Files Between A Certain Size In Linux

You might wonder how to find and list files between a certain size. For instance, you can find files between 100MB and 500MB using the following command:

find . -type f -size +100M -size -500M -exec ls -l {} +

You can use size switch for other formats, such as

  • “c” for bytes
  • “w” for two-byte words
  • “k” for Kilobytes
  • “M” for Megabytes
  • “G” for Gigabytes
If you enjoyed this article, then you’ll love Zalvis's Cloud Hosting platform. Turbocharge your website and get 24/7 support from our veteran team. Our world-class hosting infrastructure focuses on auto-scaling, performance, and security. Let us show you the Zalvis difference! Check out our services.