rmlint – Reference
Version: 2.10.x (Ludicrous Lemur)
Purpose: Find duplicate files, empty dirs, broken links and other space waste
Key principle: rmlint never deletes anything — it produces scripts that do
Syntax
rmlint [PATHS...] [//] [TAGGED_PATHS...] [-] [OPTIONS]
Paths before // are untagged (default). Paths after // are tagged (preferred as originals).
Lint Types (-T / --types)
| Short | Long | Description |
|---|---|---|
df | duplicates | Duplicate files |
dd | duplicatedirs | Duplicate directories (same as -D) |
ef | emptyfiles | Empty files |
ed | emptydirs | Empty directories |
bl | badlinks | Broken symbolic links |
bi | badids | Files with bad UID/GID |
ns | nonstripped | Binaries with debug symbols (must enable explicitly) |
Groups: all · defaults (all minus ns) · minimal (defaults minus ef,ed) · minimaldirs · none
General Options
| Short | Long | Default | Description |
|---|---|---|---|
-T | --types | defaults | Lint types to search for |
-o | --output | sh + pretty + summary + json | Set output formatters (overrides defaults) |
-O | --add-output | — | Add output formatter (preserves defaults) |
-c | --config | — | Configure a formatter (-c sh:link) |
-a | --algorithm | blake2b | Hash algorithm for dupe detection |
-p | --paranoid | — | Byte-by-byte comparison |
-P | --less-paranoid | — | Use faster/weaker hash |
-v | --loud | — | Increase verbosity (stackable) |
-V | --quiet | — | Decrease verbosity (stackable) |
-g | --progress | off | Show progress bar with sane defaults |
-D | --merge-directories | off | Find duplicate directory trees |
-j | --honour-dir-layout | off | Require same path layout for dupe dirs |
-y | --sort-by | none | Sort output groups |
-w | --with-color | on | Colored output |
-z | --perms | no check | Only consider files with given permissions (rwx) |
Hash Algorithms (-a)
| Bits | Algorithms |
|---|---|
| 512 | blake2b · blake2bp · sha3-512 · sha512 |
| 384 | sha3-384 |
| 256 | blake2s · blake2sp · sha3-256 · sha256 · highway256 · metro256 · metrocrc256 |
| 160 | sha1 |
| 128 | md5 · murmur · metro · metrocrc |
| 64 | highway64 · xxhash (not recommended) |
Paranoia shortcuts: -p = byte-by-byte · -P = highway256 · -PP = metro256 · -PPP = metro
Traversal Options
| Short | Long | Default | Description |
|---|---|---|---|
-s | --size | 1 (≥1 byte) | Size range filter (100KB-2M) |
-d | --max-depth | INF | Max recursion depth |
-l | --hardlinked | default | Treat hardlinks as dupes |
-L | --no-hardlinked | — | Ignore all but one of hardlinked set |
-f | --followlinks | — | Follow symlinks |
-F | --no-followlinks | — | Ignore symlinks completely |
-@ | --see-symlinks | default | Treat symlinks as small files |
-x | --no-crossdev | — | Stay on same filesystem |
-X | --crossdev | default | Allow crossing mountpoints |
-r | --hidden | — | Include hidden files/dirs |
-R | --no-hidden | default | Skip hidden files/dirs |
-b | --match-basename | — | Only match files with same basename |
-B | --unmatched-basename | — | Only match files with different basename |
-e | --match-extension | — | Only match files with same extension |
-i | --match-without-extension | — | Match by basename minus extension |
-n | --newer-than-stamp | — | Filter by mtime from stamp file |
-N | --newer-than | — | Filter by mtime (ISO8601 or epoch) |
Original Detection Options
| Short | Long | Description |
|---|---|---|
-k | --keep-all-tagged | Never delete files in tagged (//) paths |
-K | --keep-all-untagged | Never delete files in untagged paths |
-m | --must-match-tagged | Only find dupes with ≥1 file in tagged paths |
-M | --must-match-untagged | Only find dupes with ≥1 file in untagged paths |
-S | --rank-by | Sort criteria for original selection (default: pOma) |
Rank-By Keys (-S)
| Key | Keep… | KEY | Keep… |
|---|---|---|---|
m | oldest mtime | M | newest mtime |
a | first alphabetically | A | last alphabetically |
p | first named path | P | last named path |
d | lowest depth | D | highest depth |
l | shortest basename | L | longest basename |
h | lowest hardlink count | H | highest hardlink count |
o | lowest external hardlinks | O | highest external hardlinks |
r | paths matching regex | R | paths not matching regex |
x | basenames matching regex | X | basenames not matching regex |
Default pOma: prefer first-named path → most external hardlinks → oldest → alphabetical
Caching Options
| Flag | Description |
|---|---|
--replay | Re-read a previous .json run (no disk I/O) |
-C / --xattr | Shortcut for --xattr-read --xattr-write --write-unfinished |
--xattr-read | Read cached checksums from extended attributes |
--xattr-write | Write checksums to extended attributes after hashing |
--xattr-clear | Clear cached checksums from extended attributes |
-U / --write-unfinished | Include partially-hashed files in output |
Miscellaneous Options
| Short | Long | Default | Description |
|---|---|---|---|
-t | --threads | 16 | Threads for traversal & hashing |
-u | --limit-mem | — | Max memory for hashing (-u 512M) |
-q | --clamp-low | 0 | Read file from this offset |
-Q | --clamp-top | 1.0 | Read file up to this offset |
-Z | --mtime-window | -1 | Max mtime difference (seconds) for dupes |
Output Formatters (-o / -O)
| Formatter | Description |
|---|---|
sh | Shell script with removal commands (default) |
json | JSON document (streamable) (default) |
csv | Comma-separated values |
py | Python script + JSON |
pretty | Colored real-time display (default) |
summary | Post-run statistics (default) |
progressbar | Progress bar (use with -g) |
fdupes | fdupes-compatible output |
stamp | Timestamp for --newer-than-stamp |
uniques | One unique file path per line |
Shell Script Handlers (-c sh:handler=...)
| Handler | Description |
|---|---|
clone | FIDEDUPERANGE ioctl (btrfs, kernel 4.2+) |
reflink | Reflink dupe → original (CoW filesystems) |
hardlink | Hardlink dupe → original (same partition) |
symlink | Symlink dupe → original (always works) |
remove | rm -rf (default) |
usercmd | Run user command from -c sh:cmd='...' |
Shortcuts: -c sh:link = clone,reflink,hardlink,symlink · -c sh:hardlink = hardlink,symlink · -c sh:symlink = symlink
Standalone Commands
| Command | Description |
|---|---|
rmlint --gui | Launch Shredder GUI |
rmlint --equal <p1> <p2> | Test if two paths have identical content |
rmlint --dedupe <src> <dest> | Dedupe via reflink (CoW filesystems) |
rmlint --is-reflink <f1> <f2> | Test if two files share physical storage |
Common Recipes
# Basic scan with progress bar rmlint -g ~/data # Find dupes, prefer originals in master dir rmlint ~/backup // ~/master -k -m # Deduplicate with hardlinks (fallback to symlinks) rmlint -c sh:hardlink ~/photos # Deduplicate on btrfs rmlint -c sh:link ~/snapshots # Only files > 1MB, byte-by-byte comparison rmlint -p -s 1M ~/documents # Find duplicate directory trees rmlint -D ~/projects # Replay previous run with different ranking rmlint --replay rmlint.json ~/data -S MaD # Use xattr caching for large datasets rmlint --xattr ~/nas/media # Custom command on duplicates rmlint -o sh -c sh:cmd='echo "dupe: $1 orig: $2"' ~/data # Only broken links, empty dirs/files rmlint -T "bl,ed,ef" ~/home # Filter by mtime rmlint -N 2025-01-01T00:00:00 ~/downloads
Source: rmlint man page · rmlint docs · GitHub
Login
0 Comments
Oldest