Find files larger than 100MB
List files exceeding a size threshold — useful for cleanup, quota enforcement, and identifying log-rotation gaps.
How to find files larger than 100mb in each shell
Bashunix
find . -type f -size +100MZshunix
find . -type f -size +100MFishunix
find . -type f -size +100MPowerShellwindows
Get-ChildItem -Recurse -File | Where-Object Length -gt 100MBcmd.exewindows
forfiles /S /M *.* /C "cmd /c if @fsize gtr 104857600 echo @path"Equivalents listed for Bash, Zsh, Fish, PowerShell, cmd.exe.
Gotchas & notes
- `find -size +100M` interprets `M` as 1048576 BYTES (binary MiB) on both GNU and BSD find. Other units: `c` (bytes), `k` (KiB), `M` (MiB), `G` (GiB). `find -size +100c` is "+100 BYTES" — easy off-by-six-orders-of-magnitude mistake when you mean MB. ALWAYS pair the number with an explicit unit suffix.
- pwsh literal sizes are BINARY: `100MB` literal = `104857600` (= 100 × 1024²). The pwsh `1MB` and Linux `M` both mean MiB despite the casual "MB" label — they coincide. There's no `1MiB` literal in pwsh, but `1GB = 1073741824` matches `1GiB` semantics. Drive-vendor "MB"/"GB" are decimal (10⁶/10⁹). A "100 MB" log file holds 100,000,000 bytes ≈ 95.37 MiB. Don't mix the two in capacity-planning math.
- Sort by size descending (largest first): `find . -type f -size +100M -exec ls -lh {} + | sort -k5 -rh | head -20` (GNU `sort -h` is human-numeric — works with `100M`/`1.2G`; BSD lacks `-h`, use `du -h | sort -h` after `brew install coreutils` `gsort`). pwsh: `Get-ChildItem -Recurse -File | Where-Object Length -gt 100MB | Sort-Object Length -Descending | Select-Object -First 20`.
- Big-files-by-directory roll-up: `du -ahx . | sort -h | tail -20` shows the 20 largest leaves (files + dirs). For files-only: `find . -type f -size +100M -printf "%s\t%p\n" | sort -n -k1` (GNU `-printf` only — macOS BSD lacks). The `-x` keeps `du` from crossing filesystem boundaries (don't accidentally recurse into a 4TB mounted NAS).
Related commands
Related tasks
- Find the largest files in a directory— Identify the top N largest files under a directory tree, sorted by size.
- List the largest directories in a tree— Find the biggest directories anywhere in a tree (not just top-level immediate children) — for tracking down where a node_modules, log dir, or build artifact bloat is hiding deep in a project.
- Show disk usage by folder— See which subdirectories consume the most disk space — for "where did 50GB go" investigations or post-clean audits.
- Get a file size in bytes— Print the size of a file in bytes — for quotas, validation, and disk-usage scripts.