From 47f004dcf546474f76f7f923034ba97e5d658f13 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Mon, 16 May 2022 02:08:37 +0200 Subject: [PATCH] Improved upon jdupes's KB --- knowledge base/jdupes.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/knowledge base/jdupes.md b/knowledge base/jdupes.md index 44859bd..646e0ae 100644 --- a/knowledge base/jdupes.md +++ b/knowledge base/jdupes.md @@ -3,18 +3,19 @@ ## TL;DR ```sh -# prompt to delete all duplicate files +# Prompt to delete all duplicate files. jdupes -Zdr directory -# automatically replace duplicate files with hard links to the first encountered +# Automatically replace duplicate files with hardlinks to the first encountered. jdupes -ONLr directory1 directory2 directory3 file -# quickly list all duplicate gz archives +# Quickly list all duplicate GZ archives. jdupes -rQX onlyext:gz directory -# delete all duplicates from a folder keeping all other folders intact -# will need multiple runs -find -mindepth 1 -maxdepth 1 -type d -not -name directoryWithDuplicates | xargs -I {} -n 1 -t jdupes -drINOZ {} directoryWithDuplicates +# Delete all duplicates from a folder while keeping all other folders intact. +# Usually needs multiple runs to delete all duplicates. +find -mindepth 1 -maxdepth 1 -type d -not -name directoryWithDuplicates \ +| xargs -I {} -n 1 -t jdupes -drINOZ {} directoryWithDuplicates ``` ## Options