Want to free up some space, don't want to delete non-duplicates.
January 9, 2011 3:58 PM Subscribe
Two folders with almost identical contents. How to either delete duplicates or move not-duplicates. On OS X, happy to use terminal.
posted by djgh to Computers & Internet (12 answers total) 9 users marked this as a favorite
I have two folders (my current and previous iTunes library, so lots of nested folders etc.).
I would like to compare $oldfolder with $currentfolder, and either:
1. delete all duplicates in $oldfolder; or
2. move all non-duplicates from $oldfolder into a separate location
If option 1. is taken, I would like any empty directories to be removed.
If option 2. is taken, I'm not fussed as to whether the AAC/MP3 files are moved and just dumped in a new folder, or whether the file structure is maintained.
The contents of $oldfolder aren't indexed by my iTunes library (that's only $currentfolder), so this isn't a case of duplicates in my iTunes library, just a case of duplicate files on my system.
I'm happy to use the terminal for this, but doing this from scratch is a little beyond my competence.
Thanks for your help!