[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Script to delete duplicate files

Paul E Condon wrote:

On Fri, May 19, 2006 at 07:10:41PM -0700, Curtis Vaughan wrote:
Ok, using fdupes -f I have created a file that contains a list of all duplicate files. So, what command can a run against that file to delete all the files listed in it?

Or since I know that fdupes -f works, could I just do something like:

fdupes -f ./ | rm *

or would that rm everything?

read man fdupes
note the -d option

No actually the -d option is not an option. The reason is is because it then asks you after all found duplicates, which of them you wish to keep. Well, I have some 5000 duplicates to go through, so it will take forever. I would rather think of a way to use the output of fdupes or the file I created to delete all the duplicates.

I'm trying to remember how the correct way would be to do something like:

fdupes -f ./ | rm %[?]

it seems like that would be more right. But god, I've forgotten how to script.

Thanks for any help, though.

Reply to: