Removing duplicate files, keeping only the newest file

Posted by pinkie_d_pie_0228 on Super User See other posts from Super User or by pinkie_d_pie_0228
Published on 2012-11-13T04:27:15Z Indexed on 2012/11/13 5:04 UTC
Read the original article Hit count: 557

Filed under:
|

I'm trying to clean up a photo dump folder, in which several files are duplicated but with different filenames or lost in subfolders.

I've looked at tools like rmlint, duff and fdupes, but I can't seem to find a way to have them keep only the file with the most recent timestamp. I suspect I have to postprocess the results, but I don't even know where to start to do this.

Can anyone guide me on how to get the duplicate files list and delete everything but the newest file?

© Super User or respective owner

Related posts about shell

Related posts about filesystems