Wanting a better fdupes program

The fdupes program came in handy today when having to delete (or move, to be safe) a large number of duplicate files. I used this command:

  • fdupes -r -n -1 . | cut -f1 -d' ' | xargs -I '{}' mv -v '{}' /var/tmp/

However I still had to run this command several times in various subdirectories because I didn’t want to delete matches that were in different directories. So 1 nice change would be to not find matches in different directories when using recursion. Another nice option would be to automatically delete based on a small set of criteria (probably older or newer). I can imagine the improved version would look something like this:

  • fdupes -r -n --delete-newer --donotmatchacrossdirectories .

Trackback URL for this post:

http://hightechsorcery.com/trackback/201
Creative Commons License Except where otherwise noted, content on this site is licensed under a Creative Commons by-nc-sa 3.0 License