2016-09-12 Deduplication using Hardlinks

Is there an easy way to replace duplicate files with hardlinks?

alex@sibirocobombus:~$ sudo apt-get install rdfind
...
alex@sibirocobombus:~/alexschroeder.ch/gallery$ rdfind -makehardlinks true .
Now scanning ".", found 1444 files.
Now have 1444 files in total.
Removed 0 files due to nonunique device and inode.
Now removing files with zero size from list...removed 0 files
Total size is 727909890 bytes or 694 Mib
Now sorting on size:removed 1160 files due to unique sizes from list.284 files left.
Now eliminating candidates based on first bytes:removed 38 files from list.246 files left.
Now eliminating candidates based on last bytes:removed 41 files from list.205 files left.
Now eliminating candidates based on md5 checksum:removed 0 files from list.205 files left.
It seems like you have 205 files that are not unique
Totally, 2 Mib can be reduced.
Now making results file results.txt
Now making hard links.
Making 183 links.

It’s not much, but I like it.

​#Administration ​#Debian