LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to AUTO remove duplicate files (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-auto-remove-duplicate-files-591513/)

drudge 10-13-2007 11:16 AM

How to AUTO remove duplicate files
 
Hi, I wish to remove duplicate files from my midi collection.
I started with fdupes which lets me choose which of the dupes I wish
to keep (Usually 1).

Then I realised I would have to decide over 12,000 times. Not practical!
I would be happy just to keep the first copy, then delete the rest.

Is there an app that might do this for me, or would I have to pass
the option from fdupes to some sort of bash script thingy?

I realise it's not a good idea to let the system loose like this, but
the doesn't seem to be an alternative.

If it requires a bash script, some/any advice would be greatly
appreciated, as I don't have any idea where to start.

Thanks

drudge 10-13-2007 11:42 AM

Sorry about this, but I think I've sorted it.

I found a reference to a command called 'yes' which seems to pass
a string.

yes 1 | fdupes -rd /mnt/hda5/midi_files

Just in case anyones interested.

matthewg42 10-13-2007 12:22 PM

Thanks for posting the solution you found - it's good for with other people with a similar need are directed to the thread by search engines. :)

Junior Hacker 10-13-2007 12:25 PM

There are a couple examples in this thread.

drudge 10-13-2007 12:57 PM

Quote:

Originally Posted by Junior Hacker (Post 2923020)
There are a couple examples in this thread.

Thanks for that, duplicate photos were going to be next.
I did wonder about the accuracy of fdupes, I didn't realise there are
apps specializing in finding dupe images.

Very handy!

bunyip 03-31-2008 11:07 PM

Bonzer! That script was exactly what I've been looking for. It's so good on the trial folders I set up, that when I let it loose on /dev/hda, it instantly recognised that I had two operating systems, deleted the one (marked "Windoof Genuine Advantage"), and kept the better version (marked "linux")! Only joking about the last bit, I cleared that crap off my hard drive five years ago, but sincerely, well discovered!

spx2 04-22-2008 07:29 PM

a customizable alternative
 
if you're interested in a solution where you can rank directories
for priority of beeing deleted if duplicates found in them.
also providing a configuration file with regexes for selection
of files.
you can find a full list of features here.
the program is here http://perlhobby.googlecode.com/svn/...e_eraser_v0.7/.
also there is a readme file here that describes the program in detail.

dinasmidth 12-11-2012 01:54 AM

Duplicate Files Deleter
 
I read your post. We all need to delate Duplicate Files Deleter softwere for delete Duplicate files form our PC. So I have a softwere for this work. I sheared with you my softwere so there is the link to go my site Just go there and download the free version of this softwere. If you like that then buy If not you don't want to buy it.

descendant_command 12-11-2012 02:03 AM

from man fdupes:
Code:

-N --noprompt
      when used together with --delete, preserve  the  first  file  in
      each  set  of duplicates and delete the others without prompting
      the user

No script required :)

joshuarobers 03-13-2013 02:19 PM

I've recently found a software "Duplicate Files Deleter", and it can help you with this. Check http://DuplicateFilesDeleter.com . There is a video to explain the process. Pretty nice solution to delete duplicates safely.


All times are GMT -5. The time now is 09:31 AM.