So I have a problem. I have WAY too many hard drives and backups from decades of computing. I just hoard everything. The issue is now I don’t know what I have duplicates of and what I don’t. or when I want to format an old external drive for something else, I’m not sure if I actually have a backup of it.
I just want a way to basically compare folders and see what files are missing or what are duplicates. I’m fine with CLI but I may prefer a GUI for this so I’m not deleting files by accident as easily…
I have searched around for this question but all the solutions seem way too complex for me.
rsync has a
--dry-run / -nflag that would tell you which files would be synced. Combined with--archive /-ait runs recursively.That said, it’s assumes file paths are matching between source and destination, so if things are scattered, it might not work well.
If you’re really scattered, I’d consider using a simple python script to walk directories and create a json file with results (maybe the sha256 for key and filename, size, absolute path, and created/modified stamps as fields). Then when you hit a duplicate key, you can dump the results and prompt a delete.
Or something. I’m just spit balling here.
There’s a couple programs I use.
Meld, for comparing folders exactly: http://meldmerge.org/
Czkawka for finding duplicate and similar files all scattered around: https://czkawka.net/
I was literally about to link czawka
+1 for meld. Also, I use fdupes a lot just to see where many duplicates reside
I’m only familiar with CLI tools but at least for smaller directories diff works well. Say you have a backup directory and you want to see how it differs from a source directory:
diff -rq /source/directory /backup/directoryAnother trick is to use find to look for a unique file to see where, if at all, it’s backed up:
find /backup/directory -name unique-file-name.jpgI could start with this !
I love CLI where I understand it I just am not as trusting when dealing witharge amounts of files. Of myself.
I’m sure someone else has a better method, but I’d just use whatever file manager you have to consolidate everything into one folder and let the file system flag any dupes.
Have ten movie folders on a bunch of different drives? Pick the biggest one, attempt to move the next biggest one into it, ignore all dupes, repeat.
Again, though, there’s probably a better way
This would be my solution as well but I know there must be better ways !
You could rsync everything into one pile, recursively walking through all directories. You’d need a way to smush duplicate files with different names, but also to catch the opposite case of different files with the same name.
Maybe this helps


