I have a folder that has over 1000 text files in it and I need to check if they all have the same contents, they are all the same size so I can't tell that way - does anyone know of a mass file comparison too that will accept many files as an input and highlight any changes that differ from the first file that was loaded?

OS=Windows

link|improve this question

feedback

1 Answer

up vote 2 down vote accepted

md5sum is probably easiest, then compare the results. You can script this if it's done often but as a one off you can just do the below by hand.

On linux: md5sum [first file]

Take that hash (via copy/paste) and:

md5sum * | sort | grep -v [first hash]

This'll leave anything that has a different hash value.

link|improve this answer
Is there an equivalent in windows, I know I could probably use cgywin, but I hope I could just find an app that I could point to a folder and get what I wanted? – Mr Shoubs Jun 6 '11 at 10:27
Hmmm. to me that's filed under "here be dragons" :) pc-tools.net/win32/md5sums for the md5 bit, dunno about grep equivalent in windows. gnuwin32.sourceforge.net/packages/grep.htm maybe. – Sirex Jun 6 '11 at 10:30
1  
The idea was sound, I found something called md5deep that worked for me. – Mr Shoubs Jun 6 '11 at 10:39
I'd use rsync (automatically handles recursion) rather than running md5sum repeatedly - but then I don't have to suffer MSWindows on my servers. – symcbean Jun 6 '11 at 12:48
Cygwin has all these utilities. I recommend it to every windows power user. – LatinSuD Jun 6 '11 at 12:52
feedback

Your Answer

 
or
required, but never shown

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