Size ranges select files whose size is between the inclusive limits specified. The second parameter of a size range is optional. If you use a single parameter, you will select all files of the specified size or larger. You can also precede the second parameter with a plus sign [+]; when you do, it is added to the first value to determine the largest file size to include in the search.
You can test the compressed file size (if you are using NTFS file compression) by appending a C to the s argument.
You can exclude a size range by preceding the range with the ! character.
When you use a size range in a command it should immediately follow the command name. See General Rules for Using Ranges for additional details.
Either or both values in a size range can be suffixed with a scale factor from the table below. Lower case letters denote a power of 1,000, upper case letters a power of 1,024 (2**10).
Code |
Scale Factor |
Code |
Scale Factor |
Unit Name |
||
k |
1,000 |
10**3 |
K |
1,024 |
2**10 |
kilobyte |
m |
1,000,000 |
10**6 |
M |
1,048,576 |
2**20 |
megabyte |
g |
1,000,000,000 |
10**9 |
G |
1,073,741,824 |
2**30 |
gigabyte |
t |
1,000,000,000,000 |
10**12 |
T |
1,099,511,627,776 |
2**40 |
terabyte |
p |
1,000,000,000,000,000 |
10**15 |
P |
1,125,899,906,842,624 |
2**50 |
petabyte |
Examples of size ranges:
Specification | Selects Files of Length |
/[s0,0] | zero (empty) |
/[s1M] | 2**20 bytes or larger |
/[s10k,+200] | between 10,000 and 10,200 bytes, inclusive |
/[s10,153k] | between 10 and 153,000 bytes, inclusive |
/![s1K,5K] | less than 1K or greater than 5K |
/[sc10K,20K] | compressed file size is between 10K and 20K. |