How can I diff two Redhat Linux servers?
- by Stuart Woodward
I have two servers that have should have the same setup except for known differences.
By running:
find / \( -path /proc -o -path /sys -o -path /dev \) -prune -o -print | sort > allfiles.txt
I can find a list of all the files on one server and compare it against the list of files on the the other server. This will show me the differences in the names of the files that reside on the servers.
What I really want to do is run a checksum on all the files on both of the servers and compare them to also find where the contents are different. e.g
find / \( -path /proc -o -path /sys -o -path /dev \) -prune -o -print | xargs /usr/bin/sha1sum
Is this a sensible way to do this? I was thinking that rysnc already has most of this functionality but can it be used to provide the list of differences?