If you have to find files that are smaller than a particular file size, you can use find
command to do the job.
First, go to your folder where to start the find and type:
$ find . -type f -size -5k
This outputs all the files that are smaller than 5k and are located under the current folder (and subfolders).
.
is the starting folder, which is the current folder in this case-type f
means that we want to search only files, not directories or anything else-size
means that we want to search by size of the file-5k
is the sizeYou can find by any file size threshold, as well. Here is a guide:
c
is bytesk
for kilobytesM
for megabytesG
for gigabytesSee also: Find Files Larger Than 1GB in Linux