List and Compare Files accross different servers.

Hi all,

This is my situation. First thing is I cannot use rsync to accomplish this. I don't have on my systems and we can't put it on. I run HP-UX 11v3.

I have a list of files generated every day which tells me which files are not in sync with the rest of the servers.

I want to ls -l the files on that list and compare the time stamps and sizes to other servers. And I want to automatize it.

Here is what I have so far:

#!/usr/bin/sh

while read fname; do
   /usr/local/bin/hosts /usr/bin/hostname | while read box
   do
      ssh "${box}" "/usr/bin/ll \"${fname}\""
      echo "${box} $fname"
   done
done < /home/user/bin/dirsyncfiles

Some explanations:

/usr/local/bin/hosts is a file which lists all hosts to be synced.
/usr/bin/hostname is a file which list the hostname of the server you are running the script from (need it so I can compare the files on the server I'm on as well).
/home/user/bin/dirsyncfiles is a file containing the file locations to be checked.
/usr/bin/ll is just a custom compiled version of ls -l.

My problem is that the scripts breaks after it lists the files on the first server it checks it on.

i.e.

Also it is not really usable because it doesn't compare the file time stamps and sizes.I know I could probably use diff to compare them visually or a find | xargs somehow. I'm not really good at doing these little scripts. Is there a better way to do this.

I have another script which the good people of this site have helped me with that compares MD5 sums, but that will only tell me that they are different, and not why.

I know rsync is a to-go tool for these things however I can't use it. I need some help to automate this as best I can without manually checking 30 different file locations on 10 different servers. Sometimes even more files.

Seems md5 has been excluded. I remove my comments.