Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
Find duplicate files on Mac OS X

I am trying to grep duplicate files in this selection:

find . -name '*.CR2'

I want to delete duplicate CR2 on my RAW files archive. How can I grep them maintaining the path? Or is there a better way to remove them?

I'd like to identify them by name and size.

share|improve this question
    
I doubt this can be done with grep, but there should be other methods. How exactly do you identify duplicate files? –  Dennis Jan 13 '13 at 17:54
    
Add diff to your toolbox. –  Tom Wijsman Jan 13 '13 at 17:57
    
I want to identify them by name and eventually by size! –  TechnoPhil Jan 13 '13 at 18:10
    
Excuse me guys for my bad english! I can't use "fdupes" because i am using Mac OS! Thanks for support! –  TechnoPhil Jan 13 '13 at 21:00
    
I just found another question dealing with the exact same problem, see: Find duplicate files on Mac OS X — the first answer lists a couple of tools you can try, even if you can't install fdupes. (You can install fdupes through Homebrew if you want, but it takes a little to get it set up). If you want to reply to me here, please use @slhck. –  slhck Jan 13 '13 at 21:23
add comment

marked as duplicate by slhck Jan 13 '13 at 21:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

What you want to achieve might be a perfect fit for fdupes. From the manpage:

SYNOPSIS fdupes [ options ] DIRECTORY ...

DESCRIPTION Searches the given path for duplicate files. Such files are found by comparing file sizes and MD5 signatures, followed by a byte-by-byte comparison.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.