Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

file_size

Matches files by their size. Directories are ignored (filter returns false for directories).

Syntax

Shorthand

- file_size: "> 10mb"
- file_size: "<= 500kb"
- file_size: ">= 1gb"

Explicit

- file_size:
    greater_than:
      mb: 10

- file_size:
    between:
      min:
        mb: 1
      max:
        gb: 1

Operators

shorthandexplicitdescription
>greater_thanStrictly greater than
>=at_leastGreater than or equal
<less_thanStrictly less than
<=at_mostLess than or equal
-betweenWithin a range (inclusive)

Size units

unitbytes
b1
kb1,024
mb1,048,576
gb1,073,741,824
tb1,099,511,627,776

Units are case-insensitive (MB, mb, Mb all work).

Examples

Match large files (> 100MB)

- file_size: "> 100mb"

Match small files (< 1KB)

- file_size: "< 1kb"

Match files in a range

- file_size:
    between:
      min:
        mb: 10
      max:
        mb: 100

Match empty files

- file_size: "< 1b"

Match files at least 1GB

- file_size: ">= 1gb"