Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-03-2011, 05:02 PM   #1
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Rep: Reputation: 40
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,
Old 02-03-2011, 05:20 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911
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
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).

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

Last edited by Tinkster; 02-03-2011 at 05:22 PM.
Old 02-03-2011, 06:28 PM   #3
Registered: Mar 2007
Distribution: Debian
Posts: 547

Rep: Reputation: 67
you can also use fdupes, which checks hash values I think.
f-spot and digikam also have plugins to remove duplicates.
Old 02-03-2011, 07:39 PM   #4
Registered: Oct 2008
Location: Brisbane Australia
Distribution: Fedora, Centos
Posts: 282

Rep: Reputation: 55
"fslint" is also a gui run program which can do what you want and more ....
Old 06-11-2011, 03:34 AM   #5
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Original Poster
Rep: Reputation: 40
I actually ended up importing everyting into Shotwell, and that work like a charm.

Thanks for the tips anyway.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to Upload Photos to Facebook From Ubuntu LXer Syndicated Linux News 0 08-22-2010 05:41 PM
Ubuntu: slow navigation in folders, slow visualization of photos, blocks.... All I Want Linux - Newbie 5 10-05-2008 10:59 AM
can't upload photos in 10.3 Sandie SUSE / openSUSE 0 11-24-2007 08:27 PM
Photos davholla General 10 01-01-2007 11:12 AM
more funny photos... acid_kewpie General 9 01-02-2002 09:22 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:48 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration