Script to Compare a large number of files.

I have a large Filesystem on an AIX server and another one on a Red Hat box. I have syncd the two filesystems using rsysnc.

What Im looking for is a script that would compare to the two filesystems to make sure the bits match up and the number of files match up.

its around 2.8 million files

Any easy way to do this?

Zipp
San Antonio, Tx

rsync can do that, man rsync ( --checksum , --dry-run)

Would use a one-way hash on every file off each of the boxes > toalocalfile
Then run a diff on on the two comparison files.

cksum or md5sum maybe like this:

find . /path/to/file -type f -exec cksum {} \; >  RHbox
ssh <..connect to solaris.........>  . /path/to/file -type f -exec cksum {} \; > SOLbox
sort -o RHbox rhbox
sort -o SOLbox SOLbox
diff RHbox SOLbox

We use something like this for a check on migrating filesystems. For 2.8M files this is going to take a loooong time.

If rsync can do it let rsync play the game.

I used rsync once to move the files over but the files were corrupted.

It moved a file over with the right permissions and even the right size but when I went to open the file ... there wasnt anything in it.

The best option is to copy files using scp and use rsync to sync the two systems.
You should run small tests using small files/directory and if everything work as expected move to the big stuff.
And don't forget to read and understand the rsync manual. Base on rsync FAQ you need 80MB Ram for 800k files... for your 2.8M files you will need 320+MB Ram.