Exclude files when run
To exclude files, using
find command, then pass the parameter
rmlint as folder name
$ find /target/dir -type f ! -name '*.nib' ! -name '*.icon' ! -name '*.plist' | rmlint [options] -
For only search specific type of file, can use following command:
find /mm -iname "*.DFF" -type f | rmlint -T df --config=sh:handler=hardlink -
How do I exclude/ignore specific file types/extensions with rmlint?
rmlint can be used to dedup the files, which can support reflink.
I was using reflink dedup for BTRFS, but end up, I changed to hardlink. I think hardlink is more commonly used in Unix environment
rmlint -T df --config=sh:handler=hardlink /dedup
This will dedup the files in /dedup directory, and will generate a file called
rmlint.sh in current directory. Run that shell script, will change duplicated files to hard link.
-T df means dedup files.
config=sh means generate shell script
handler=hardlink means generate script using hardlink dedup
There are many options, but I don't use them.
Gentle Guide to rmlint
2 examples for rmlint