On my local box
"machineA", I have two folders
"/secondary". These two folders have some files in it. Now on the remote server
"machineB" I have one folder
"/bat/snap/" which contains lot of files.
All the files in
"/secondary" folders in
"machineA" should be there in
"machineB" remote server in this directory
"/bat/snap/". Now I need to compare checksum of all files in
"/secondary" folder on local box
"machineA" with remote server in this directory
"/bat/snap/". If there is any mismatch in checksum then I want to report all those files that has issue in
Do I need to use md5checksum here?
This is the command I am running on
find /primary/ /secondary/ -type f | xargs md5sum | ssh machineB '(cd /bat/snap/ && md5sum -c)' | egrep -v 'OK$'
Below is the error I am getting and after that I stopped my above command. I checked both the servers and I can see this file is present so what's wrong then?
md5sum: /primary/abc_monthly_134_proc_7.data: No such file or directory /primary/abc_monthly_134_proc_7.data: FAILED open or read