deduplicate

rdfind: find duplicate files, then delete them, or turn them into links.

Ask if a directory has duplicates (rdfind will not delete anything):

1rdfind $dir
2$EDITOR results.txt

Replace the duplicated files with hard links.

1rdfind -makehardlinks true $dir