LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-11-2019, 04:12 PM   #1
hkjz
Member
 
Registered: Apr 2019
Distribution: MX
Posts: 182

Rep: Reputation: Disabled
Duplicates of photos - different names


Dear All,

lets say that there is directory with 5 000.jpg files.
Many of those files are duplicates of each other (photos), but each file have unique name.

Any ideas how this problem can be resolved without sorting this manually?

Thank you!
 
Old 04-11-2019, 06:07 PM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Have you tried something like fslint to find the duplicates?
 
Old 04-11-2019, 07:53 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,139

Rep: Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122
No doubt a continuation of your previous thread. There are several tools and innumerable threads about similar. If they are all in the one directory you are fortunate and can allow the tool to simply delete dups without regard to which to keep (i.e. which is the "original").
 
Old 04-11-2019, 08:57 PM   #4
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,971

Rep: Reputation: 271Reputation: 271Reputation: 271
I'd create an md5sum for each, make a database associating each md5sum with file name, search on duplicate md5sums.
 
Old 04-12-2019, 01:08 PM   #5
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368

Rep: Reputation: 64
Quote:
Originally Posted by RandomTroll View Post
I'd create an md5sum for each, make a database associating each md5sum with file name, search on duplicate md5sums.
Which is pretty much exactly what "fdupes" does, so no need to reinvent the wheel.
 
1 members found this post helpful.
Old 04-12-2019, 11:36 PM   #6
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,971

Rep: Reputation: 271Reputation: 271Reputation: 271
Quote:
Originally Posted by Thymox View Post
Which is pretty much exactly what "fdupes" does, so no need to reinvent the wheel.
Groovy! Never heard of 'fdupes', not in Slackware.
 
1 members found this post helpful.
Old 04-13-2019, 03:14 AM   #7
LQ496873
Member
 
Registered: Jan 2006
Distribution: openSUSE Leap 15.3
Posts: 120

Rep: Reputation: Disabled
I had over 25 000 images with a decent number of duplicates. I think it was fslint I used to sort through them. It worked really well. Just had a quick look at the folder... I guess I removed about 3000 duplicates in about an hour.

Last edited by LQ496873; 04-13-2019 at 03:16 AM.
 
1 members found this post helpful.
Old 04-13-2019, 03:48 AM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,927

Rep: Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320
not to speak about the tool named dupfinder (http://dupfinder.com/)
 
1 members found this post helpful.
Old 04-14-2019, 12:16 PM   #9
hkjz
Member
 
Registered: Apr 2019
Distribution: MX
Posts: 182

Original Poster
Rep: Reputation: Disabled
Code:
fdupes
is what i used, it worked,
though i had to manually choice which file suppose to be saved from the list - for every single duplicates

1640 times i hit '1' and then 'enter', it was quite a thing hehe
 
Old 04-16-2019, 02:08 PM   #10
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Mostly Debian based systems
Posts: 4,368

Rep: Reputation: 64
Quote:
Originally Posted by hkjz View Post
Code:
fdupes
is what i used, it worked,
though i had to manually choice which file suppose to be saved from the list - for every single duplicates

1640 times i hit '1' and then 'enter', it was quite a thing hehe
From the man page of fdupes:
Code:
       -d --delete
              prompt user for files to  preserve,  deleting  all  others  (see
              CAVEATS below)

       -N --noprompt
              when  used  together  with  --delete, preserve the first file in
              each set of duplicates and delete the others  without  prompting
              the user
So this would have solved that:
Code:
$ fdupes -rdN ./
 
1 members found this post helpful.
Old 04-16-2019, 02:17 PM   #11
hkjz
Member
 
Registered: Apr 2019
Distribution: MX
Posts: 182

Original Poster
Rep: Reputation: Disabled
beauty
 
  


Reply



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
Look for duplicates in folder tree A and folder tree B, then delete the duplicates only from A. grumpyskeptic Linux - Software 7 10-27-2018 10:23 PM
LXer: Enhancing photos with GNOME Photos LXer Syndicated Linux News 0 07-28-2017 04:35 AM
LXer: GNOME Photos 3.11.3 Allows Users to Access Facebook Photos LXer Syndicated Linux News 0 12-13-2013 05:30 AM
Chemistry problem: Identify duplicates and non-duplicates within TWO sdf files robertselwyne Programming 5 12-09-2011 06:20 AM
Bash: bash file names are different than openbox trash file names whatthefunk Programming 4 02-15-2011 01:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:53 AM.

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