Find Files by Size on Linux
To find files based on the file size, pass the -size parameter along with the size criteria.
You can use the following suffixes to specify the file size:
- b: 512-byte blocks (default)
- c: bytes
- w: two-byte words
- k: Kilobytes
- M: Megabytes
- G: Gigabytes
The following command will find all files of exactly 88 bytes inside the / directory:
find / -type f -size 88c
Find files larger than 88M:
find / -type f -size +88M
Find files smaller than 88G
find / -type f -size -88G
Comments
Post a Comment