0

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.

5
  • I doubt this can be done with grep, but there should be other methods. How exactly do you identify duplicate files? Commented Jan 13, 2013 at 17:54
  • Add diff to your toolbox. Commented Jan 13, 2013 at 17:57
  • I want to identify them by name and eventually by size! Commented Jan 13, 2013 at 18:10
  • Excuse me guys for my bad english! I can't use "fdupes" because i am using Mac OS! Thanks for support! Commented Jan 13, 2013 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. Commented Jan 13, 2013 at 21:23

1 Answer 1

0

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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.