From 377a85c2b0add3e97cdf6f75439cb3f25550fbf4 Mon Sep 17 00:00:00 2001 From: Malin Freeborn Date: Wed, 7 Aug 2024 18:03:53 +0200 Subject: [PATCH] deduplicate with rdfind --- system/deduplicate.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 system/deduplicate.md diff --git a/system/deduplicate.md b/system/deduplicate.md new file mode 100644 index 0000000..b9fbbac --- /dev/null +++ b/system/deduplicate.md @@ -0,0 +1,19 @@ +--- +title: "deduplicate" +tags: [ "system", "deduplicate", "duplicates", "maintenance" ] +--- + +`rdfind`: find duplicate files, then delete them, or turn them into links. + +Ask if a directory has duplicates (`rdfind` will not delete anything): + +```bash +rdfind $dir +$EDITOR results.txt +``` + +Replace the duplicated files with [hard links](../basics/hard_links.md). + +```bash +rdfind -makehardlinks true $dir +```