rsync - How to sync files' timestamps only? -


Is there a timestamp for the sync (?) In the Linux command line only Are similar content only ?

Ie some directory structure was copied without counterattack on timestamp and was then freely modified. Now, to simplify further synchronization, it is necessary to copy the timestamp of the same files.

This looks like the answer on my question (approximate):

 < Code> rsync -a -c --existing / source / / destination /  

This will copy files that are different and as far as I can understand the timestamp of the same files I synchronize.

The key as always -n (or - dry-run )).

Added:

There is a need to mention sometimes in my question, so the script is what I have said: / P>

  #! / Bin / bash # Make sure that there is a trailing '/' SRC = "$ (dynamite $ 1) / $ (bnname $ 1) /" dst = "$ (dynaam name $ 2) / $ (bnname $ 2) /" if! [[-D "$ src"]] || ! [[-d "$ dst"]]; Then echo "use:" echo "$" (original name $ 0) src / dir dst / dir "exit 1 fi diff -rqs" $ SRC "" $ dst "| Grep -Po" (? & Lt; = $ files $ SRC). * (? = $ And $ DST. * Equal $) "| Rsync -tv --files-from = -" $ SRC "" $ DST " 

Comments