Skip to content

rmlint – Reference

cpx May 26, 2026 4 min read System Tools

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)

ShortLongDescription
dfduplicatesDuplicate files
ddduplicatedirsDuplicate directories (same as -D)
efemptyfilesEmpty files
edemptydirsEmpty directories
blbadlinksBroken symbolic links
bibadidsFiles with bad UID/GID
nsnonstrippedBinaries with debug symbols (must enable explicitly)

Groups: all · defaults (all minus ns) · minimal (defaults minus ef,ed) · minimaldirs · none


General Options

ShortLongDefaultDescription
-T--typesdefaultsLint types to search for
-o--outputsh + pretty + summary + jsonSet output formatters (overrides defaults)
-O--add-outputAdd output formatter (preserves defaults)
-c--configConfigure a formatter (-c sh:link)
-a--algorithmblake2bHash algorithm for dupe detection
-p--paranoidByte-by-byte comparison
-P--less-paranoidUse faster/weaker hash
-v--loudIncrease verbosity (stackable)
-V--quietDecrease verbosity (stackable)
-g--progressoffShow progress bar with sane defaults
-D--merge-directoriesoffFind duplicate directory trees
-j--honour-dir-layoutoffRequire same path layout for dupe dirs
-y--sort-bynoneSort output groups
-w--with-coloronColored output
-z--permsno checkOnly consider files with given permissions (rwx)

Hash Algorithms (-a)

BitsAlgorithms
512blake2b · blake2bp · sha3-512 · sha512
384sha3-384
256blake2s · blake2sp · sha3-256 · sha256 · highway256 · metro256 · metrocrc256
160sha1
128md5 · murmur · metro · metrocrc
64highway64 · xxhash (not recommended)

Paranoia shortcuts: -p = byte-by-byte · -P = highway256 · -PP = metro256 · -PPP = metro


Traversal Options

ShortLongDefaultDescription
-s--size1 (≥1 byte)Size range filter (100KB-2M)
-d--max-depthINFMax recursion depth
-l--hardlinkeddefaultTreat hardlinks as dupes
-L--no-hardlinkedIgnore all but one of hardlinked set
-f--followlinksFollow symlinks
-F--no-followlinksIgnore symlinks completely
-@--see-symlinksdefaultTreat symlinks as small files
-x--no-crossdevStay on same filesystem
-X--crossdevdefaultAllow crossing mountpoints
-r--hiddenInclude hidden files/dirs
-R--no-hiddendefaultSkip hidden files/dirs
-b--match-basenameOnly match files with same basename
-B--unmatched-basenameOnly match files with different basename
-e--match-extensionOnly match files with same extension
-i--match-without-extensionMatch by basename minus extension
-n--newer-than-stampFilter by mtime from stamp file
-N--newer-thanFilter by mtime (ISO8601 or epoch)

Original Detection Options

ShortLongDescription
-k--keep-all-taggedNever delete files in tagged (//) paths
-K--keep-all-untaggedNever delete files in untagged paths
-m--must-match-taggedOnly find dupes with ≥1 file in tagged paths
-M--must-match-untaggedOnly find dupes with ≥1 file in untagged paths
-S--rank-bySort criteria for original selection (default: pOma)

Rank-By Keys (-S)

KeyKeep…KEYKeep…
moldest mtimeMnewest mtime
afirst alphabeticallyAlast alphabetically
pfirst named pathPlast named path
dlowest depthDhighest depth
lshortest basenameLlongest basename
hlowest hardlink countHhighest hardlink count
olowest external hardlinksOhighest external hardlinks
rpaths matching regexRpaths not matching regex
xbasenames matching regexXbasenames not matching regex

Default pOma: prefer first-named path → most external hardlinks → oldest → alphabetical


Caching Options

FlagDescription
--replayRe-read a previous .json run (no disk I/O)
-C / --xattrShortcut for --xattr-read --xattr-write --write-unfinished
--xattr-readRead cached checksums from extended attributes
--xattr-writeWrite checksums to extended attributes after hashing
--xattr-clearClear cached checksums from extended attributes
-U / --write-unfinishedInclude partially-hashed files in output

Miscellaneous Options

ShortLongDefaultDescription
-t--threads16Threads for traversal & hashing
-u--limit-memMax memory for hashing (-u 512M)
-q--clamp-low0Read file from this offset
-Q--clamp-top1.0Read file up to this offset
-Z--mtime-window-1Max mtime difference (seconds) for dupes

Output Formatters (-o / -O)

FormatterDescription
shShell script with removal commands (default)
jsonJSON document (streamable) (default)
csvComma-separated values
pyPython script + JSON
prettyColored real-time display (default)
summaryPost-run statistics (default)
progressbarProgress bar (use with -g)
fdupesfdupes-compatible output
stampTimestamp for --newer-than-stamp
uniquesOne unique file path per line

Shell Script Handlers (-c sh:handler=...)

HandlerDescription
cloneFIDEDUPERANGE ioctl (btrfs, kernel 4.2+)
reflinkReflink dupe → original (CoW filesystems)
hardlinkHardlink dupe → original (same partition)
symlinkSymlink dupe → original (always works)
removerm -rf (default)
usercmdRun 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

CommandDescription
rmlint --guiLaunch 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

https://www.linkedin.com/posts/lewiswalkerai_the-layers-of-an-agentic-ai-platform-according-share-7448389610281418752-INpU?utm_source=share&utm_medium=member_ios&rcm=ACoAAAIKz-8B5JvHFavurAchVmkTrGphZWE9CW4
0 0 votes
Article Rating
guest

0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x