Skip to content

/commands/find/find-files-larger-than-size

find files larger than 100MB: find . -type f -size +100M

verified onenvironmentlocal · windows 10.0.26200 arm64 · GNU bash 5.3.15 (Git Bash) · find (GNU findutils) 4.11.0updated
tool
find
versions
GNU findutils 4.x, BSD find
os
linux, macos, windows

find . -type f -size +100M lists regular files larger than 100 MiB under the current directory. + means greater than, - less than, and no sign means exactly. The suffixes are c (bytes), k (KiB), M (MiB) and G (GiB); without a suffix the unit is a 512-byte block. find rounds each file's size up to whole units before comparing, which matters for the "smaller than" form.

Larger than a size

bash
mkdir -p logs
truncate -s 2M logs/big.log
truncate -s 1536K logs/medium.log
truncate -s 1M logs/exact.log
truncate -s 500K logs/small.log
find . -type f -size +1M | sort

Output

./logs/big.log
./logs/medium.log

exact.log (exactly 1 MiB) is not listed: +1M means more than one unit after rounding.

Smaller than a size: the rounding trap

bash
mkdir -p data
truncate -s 500K data/small.log
truncate -s 100 data/tiny.txt
: > data/empty.txt
echo "-size -1M:";    find data -type f -size -1M | sort
echo "-size -1024k:"; find data -type f -size -1024k | sort

Output

-size -1M:
data/empty.txt
-size -1024k:
data/empty.txt
data/small.log
data/tiny.txt

With -size -1M, a 500 KiB file rounds up to 1 MiB, and 1 is not less than 1, so only empty files match. Use a smaller unit (-1024k, or -1048576c for bytes) to get the result you expect.

Show sizes, largest first

bash
truncate -s 2M big.bin
truncate -s 1536K mid.bin
truncate -s 300K small.bin
find . -type f -size +256k -printf '%s\t%p\n' | sort -rn

Output

2097152	./big.bin
1572864	./mid.bin
307200	./small.bin

-printf is GNU find only. On macOS, use find . -type f -size +256k -exec ls -lh {} +, or stat -f '%z %N'.

Useful combinations

TaskCommand
Larger than 1 GiB, whole disk, stay on one filesystemfind / -xdev -type f -size +1G 2>/dev/null
Between 10 and 100 MiBfind . -type f -size +10M -size -100M
Exactly 0 bytes (empty files)find . -type f -empty
Large files changed in the last 7 daysfind . -type f -size +100M -mtime -7
Human-readable list (GNU)find . -type f -size +100M -exec du -h {} + | sort -rh

Sources