Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am writing script to search for dups files and group them by size and then by their MD5 check sum.

here is my script:

find . -type f -printf "%s\n" | sort -rn | uniq -d | xargs -I{} -n1 find -type f -size {}c -print0 | xargs -0 md5sum | sort | uniq -w32 > ./dups.txt

I want to make sure my script generate my dups files by their size and MD5 Correctly.

is there anyway that I can make sure my result is correct or will you help me to check my script and let me know, please ?

share|improve this question

Here's a similar duplicate-finding tool, in Perl, under the GPL:

You may also wish to explore the -exec option to find(1).

share|improve this answer
Thank you, but don't know much in perl yet :( thank you so much – user231620 Jun 16 '13 at 23:33

I recommend you to use fdupes, it's designed for this purpose.

Description :

a program for identifying or deleting duplicate files residing within specified directories

share|improve this answer
I can't install fdupes :( that's my problem :( – user231620 Jun 16 '13 at 22:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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