G.9 Size

The <size> tag selects files matching a specified size limit.

<fileset dir="${src}">
  <size value="4M" when="more"/>

Table G.9:  Attributes for the <size> selector

valueThe size of the file which should be tested for. Examples: 250M, 10G, 1T.n/aYes
whenIndicates how to interpret the size, whether the files to be selected should be larger, smaller, or equal to that value. Accepted values are:
  • less - select files less than the indicated size
  • more - select files greater than the indicated size
  • equal - select files this exact size


File size can be written using IEC and SI suffixes, bytes are assumed when suffix is not specified. The following suffixes (case-insensitive) are supported:

Table G.10: Supported file size suffixes

IECB. 1 byte
K, Ki, KiB, kibi, kibibyte. 1024 bytes
M, Mi, MiB, mebi, mebibyte. 1024 kibibytes
G, Gi, GiB, gibi, gibibyte. 1024 mebibytes
T, Ti, TiB, tebi, tebibyte. 1024 gibibytes
SI kB, kilo, kilobyte. 1000 bytes
MB, mega, megabyte. 1000 kilobytes
GB, giga, gigabyte. 1000 megabytes
TB, tera, terabyte. 1000 gigabytes