Command line to remove duplicate files?



I have a Fedora 6 system and want to remove some duplicate files. I have
about 1,500 jpg images on my XP machine on the LAN and setup the directory
containing the photos as a share, then mounted it in Linux with cifs, so
now I can use Linux tools on the directory. I heard of a program called
fdupes and it seemed like the perfect thing so I installed it and tried it
out. It worked great and found all duplicates but did not remove the dupes.
Instead I got asked for every set of dupes, which one I want to keep and
they would list the found dupes. I enter 1 to save the first one and then
on to question 2 for the next set, etc. There are over a hundred dupes in
this directory and to have to answer what one for each dupe is really time
consuming and there has to be a better way to do this. Maybe automating the
process with a shell script or a different approach altogether, I need your
help to figure this out. Answering 1 to fdupes did not delete the duplicate
files though, they still remain. This could be the way the permissions are
set for the cifs mount, permissions are such:

[ohmster@ohmster test]$ ls -la KatharinaTisch072*
-rw-r--r-- 1 ohmster ohmster 162726 Mar 11 16:46 KatharinaTisch072(1).jpg
-rw-r--r-- 1 ohmster ohmster 162726 Mar 11 16:46 KatharinaTisch072.jpg
[ohmster@ohmster test]$

rw, r, r, maybe I need to chmod them all to writable but still fdupes will
ask me hundreds of questions for each duplicate found. All I want is one
copy of the file and am not to particular which one it is. I would rather
have the plane one ending in 072.jpg rather than 072(1).jpg or 072_0.jpg
but it is not a very big deal.

Can anybody show me an automated method to remove dupes from thousands of
files in a directory or two please?

Thanks.

--
~Ohmster | ohmster /a/t/ ohmster dot com
Put "messageforohmster" in message body
(That is Message Body, not Subject!)
to pass my spam filter.
.



Relevant Pages

  • Re: Command line to remove duplicate files?
    ... rw, r, r, maybe I need to chmod them all to writable but still fdupes will ... ask me hundreds of questions for each duplicate found. ... ~Ohmster | ohmster /a/t/ ohmster dot com ... Put "messageforohmster" in message body ...
    (alt.os.linux)
  • Re: Duplicate Record Mess
    ... If you have a match between NAMES and HuskyTemp, ... instance, if you have more than one (duplicate), but NO record in HuskyTemp, ... If it doesn't matter how many dupes in NAMES, ... By the way, if John D. and his son John both live at the same address, ...
    (microsoft.public.access.queries)
  • Re: Avoiding dupes when merging files
    ... >> dupes? ... >> Or you could load the data into a datatable (or hash table type ... >> the datatable should throw a duplicate PK exception which you would ... Add the primary key array to the DataTable.PrimaryKey property. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Extracting duplicate records
    ... daniel wrote: ... > of the duplicate records. ... > dupes and view the information in non-indexed columns to make my ... return the dupes. ...
    (microsoft.public.sqlserver.server)
  • Re: Duplicated Records
    ... Set Error Capture On. ... when there are no more dupes. ... Find your duplicate records based on the field you created. ... End Loop ...
    (comp.databases.filemaker)

Loading