Linux Basics

You are currently auditing this course.
42 / 107

Searching files by size

We can use the -size option with the find command to search files by size. So, to search all files of size less than 1 MB, we can use:

find . -size -1M

where, - sign before 1 tells us that we want to search for files less than the mentioned size. We can use + to search for files greater than the particular size. If we don't specify any sign, then find will search for all files having a size equal to the mentioned size.

M denotes megabyte here. We can use b for 512 byte blocks which is also by default, c for bytes, k for kilobytes and G for gigabytes.


No hints are availble for this assesment

Answer is not availble for this assesment

Loading comments...