Hi folks
I need to write a shell script to check whether source and the destination has the same files. The source and destination are over two servers and connecting through ssh. It should even compare the date i.e, the complete file name, date stamp and size should match. Should list out all the unmatched files in a log file.
rsync is the tool for this sort of thing, the --dry-run option should report what would happen if you went ahead, it runs over ssh and is quite configurable.
--del removes files/directories in the destination path that don't exist in the source. This is done during transfer of changed/new files (not before or after).