Compare md5sum two servers' setup

I'm trying to think of a way to compare two boxes and make sure their files will be the same. There may be extra files on one side and some on the other.

I also need to make sure the file content is identical.

So far I've gotten this to create a file

 find /directorypath/ -type f -name "*" | xargs -n 1 md5sum >comparefile.txt
3e799eb050da202e454b5691f978d84b  /apps/RWS/jboss-222beta/RWS-db2-400-xa-ds.xml
ba813e839cd5da0fe2ad6cd673d36bdc  /apps/RWS/jboss-222beta/CustomInstall.script
5c37052421ac10f4201f33383dfa9713  /apps/RWS/jboss-222beta/deploy/BIRestServiceDynamic.war
ed98c36f719d2e227b0401963873f96c  /apps/RWS/jboss-222beta/deploy/mail-service.xml
95c8877f45cfc5fb1b180af711ef6214  /apps/RWS/jboss-222beta/deploy/HistoricalUserQualityService.war
e92758e35d1a5e6bdb1ba76bd062232e  /apps/RWS/jboss-222beta/deploy/properties-service.xml
fef27f2f1818242a6def643c6b6878cf  /apps/RWS/jboss-222beta/deploy/RWSEmailService.ear 

So I can run this on two different boxes but how can I get them to do a compare on the hash in a readable format and then show extra files on one side vs. the other.

Thanks for any help

sort either result file and then diff them?

Hi.

The utility rsync :

       Rsync finds files that need to be transferred  using  a  "quick  check"
       algorithm  (by  default) that looks for files that have changed in size
       or  in  last-modified  time. 

excerpt from man rysnc

It allows an option:

        -n, --dry-run               perform a trial run with no changes made

Best wishes ... cheers, drl

1 Like

Yeah they may not have changed in size, there may be one character difference, so the size might be identical. That's why I was trying to use md5sum to compare and make sure everythying is identical.....