Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

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.

share|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

Your Answer

 
discard

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.