LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Deduplicate photos in Ubuntu (https://www.linuxquestions.org/questions/linux-newbie-8/deduplicate-photos-in-ubuntu-860550/)

kenneho 02-03-2011 04:02 PM

Deduplicate photos in Ubuntu
 
Hi all,


I've got a lot of photos I've take over the years, and I suspect I've got lots and lots of duplicates, since I may have multiple backups for the same photos.

Have anyone experience with deduplication of photos in Ubuntu, and could recommend an approach for a quick and efficient way to do this?

Best regards,
kenneho

Tinkster 02-03-2011 04:20 PM

Depends on whether or not your photos have a) changed name or b) changed
size in any of the moving/copying processes.

A naive approach would be to go and create a list of all pix on your
system, truncate the paths, sort the list and run it against unique -c
Code:

find / -iname \*jpg | xargs -i basename "{}" | sort | uniq -c | sort -n
which will list files w/ dupes, including how many dupes it found.

Alternatively, a slightly quicker approach (if your box keeps the locate
database up to date).

Code:

locate -r '.*\.jpg' | xargs -i basename "{}" | sort | uniq -c | sort -n
Cheers,
Tink

almatic 02-03-2011 05:28 PM

you can also use fdupes, which checks hash values I think.
f-spot and digikam also have plugins to remove duplicates.

ArfaSmif 02-03-2011 06:39 PM

"fslint" is also a gui run program which can do what you want and more ....

kenneho 06-11-2011 02:34 AM

I actually ended up importing everyting into Shotwell, and that work like a charm.

Thanks for the tips anyway.


All times are GMT -5. The time now is 04:49 AM.