I have one requirement like...I need to write a shell script which will compare two directories residing in two different servers (server A and server B) and list out the discrepancies if found any. Ideally the file names, counts, size should be same for the directory in two servers. So the script should find out the discrepancies if any. Could anyone please help me? Thanks in advance and best regards, Prasenjit
|
feedback
|
|
I like to use rsync for this purpose. For example, on ServerA run:
You can remove the Note the trailing slashes on each of the paths. Very important: Make sure you have the | |||
|
feedback
|
|
One easy way of doing it on Linux would be to:
Hope this can help you get started. | |||
|
feedback
|
|
Perhaps the easiest would be if you could mount the two directories in such a way that you could do something like:
| |||
|
feedback
|
|
I suggest tree:
| |||
|
feedback
|