2

Using fdupes or fslint provides a list of duplicates but for the duplicates, the directories appear to be in no particular order. Too many files in too many directories to have to decide where I want the file with each set of duplicates.

I want to specify a prime directory and then have fdupes remove duplicates from all other directories except the prime directory.

Is there a command line for fdupes or fslint that will do this or is there another application that will?

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
Strider22
  • 21
  • 2
  • Did you look at `man fdupes` and `man fslint`? – nohillside Jul 05 '18 at 18:05
  • Yes. What I'm asking does not appear to be a standard command. I was hoping for some way to do it perhaps via bash. – Strider22 Jul 06 '18 at 03:29
  • 1
    What I have is just under 20,000 pictures for about 50GB. The directories are from different family members. Some directories are labeled as Wedding, Wedding 2018, 2018-06-02 Wedding, N and C wedding and then D and B wedding etc but others are just Camera backup 2018 with no albums. I want to preserve the albums and trim the backups down to a more reasonable size and with only unique pictures to deal with. If I end up with all the albums empty and the pictures in the backup directories the pictures may as well just be copied into one directory that will take months to put back into albums. – Strider22 Jul 06 '18 at 03:43

1 Answers1

1

Periscope might solve your problem. For example, if you have photos in "Wedding", "Wedding 2018", "2018-06-02 Wedding", and "N and C wedding", where the first directory is the prime directory, and you want to remove duplicates that occur in the other directories that are also present in the main "Wedding directory":

  1. Scan the directories for duplicates. If they are all in a single folder (with nothing else there), you can cd into it and just run a psc scan, otherwise you can name them explicitly:

    psc scan "Wedding" "Wedding 2018" "2018-06-02 Wedding" "N and C wedding"
    
  2. Delete files that have a duplicate in the "Wedding" directory (that are --contained in "Wedding"):

    psc rm --contained "Wedding" -r "Wedding 2018" "2018-06-02 Wedding" "N and C wedding"
    

(disclaimer: I wrote Periscope, after running into an almost identical problem where I had tons of unorganized photos with lots of duplicates.)

Anish
  • 11
  • 2