Comparing multiple files

I want to develop one unix script that will first match the multiple files on one server say A with multiple files on another server say B and copy those to server A. After that need to compare the contents of these 2 set of multiple files on different location on same server and generate the mismatch report.

Any help one this would be more helpful. Thanks.

Have you considered using rsync? It can probably do what you want with a lot less fuss.

Kind regards,
Robin

No, this is just for copying files from another server to local server. Secondly, it will ask for password everytime. I dont want this.

So that is that not a good job for rsync? How do you propose to authenticate with the remote server anyway?

I might be missing the point, but if you copy the files from ServerB to ServerA then they should be the same. What is the report to highlight?

Please can you clarify your requirement a little more.

Thanks, in advance,
Robin

This is exactly what rsync was made for. You have gotten very good advice from my colleague rbatte1!

From the man page of rsync (which, i suggest, you should read instead of disregarding it):

And, a few lines later:

Notice that ssh may use exchanged keys to allow passwordless connections. Find details about this in the man page of ssh .

I hope this helps.

bakunin