I’m in the process of starting a proper backup solution however over the years I’ve had a few copy-paste home directory from different systems as a quick and dirty solution. Now I have to pay my technical debt and remove the duplicates. I’m looking for a duplication removal tool.
- accept a destination directory
- source locations should be deleted after the operation
- if files content is the same then delete the redundant copy
- if files content is different, move and change the name to avoid name collision I tried doing it in nautilus but it does not look at the files content, only the file name. Eg if two photos have the same content but different name then it will also create a redundant copy.
hardlink
Most underrated tool that is frequently installed on your system. It recognizes BTRFS. Be aware that there are multiple versions of it in the wild.
It is unattended.
https://www.man7.org/linux/man-pages/man1/hardlink.1.html
Is hardlink the same as ln without the -s switch?
I tried reading the page but it’s not clear
ln
creates a hard link,ln -s
creates a symlink.So, yes, the hardlink tool effectively replaces a file’s duplicates with hard links automatically, as if you’d used
ln
manually.Ahh! Cool! Thanks for the explanation.