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.

TechnoPhil
  • 21
  • 3
  • 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. – Tamara 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](http://superuser.com/questions/46690/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](http://mxcl.github.com/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

1 Answers1

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.

BubuIIC
  • 576
  • 1
  • 3
  • 8