[PLUG] rsync overwrote newer files

Rich Shepard rshepard at appl-ecosys.com
Mon Apr 15 22:52:30 UTC 2013


   I was under the impression that rsync did not overwrite a newer file with
an older file, but that's what just happened. I'd like to understand what I
did incorrectly so I can avoid this mistake in the future.

   While I was on a business trip last week I created new files in a
subdirectory on the laptop. Wanting to copy them to the equivalent
subdirectory on my workstation I cd'd to the appropriate laptop subdirectory
and issued this command:

 	rsync -avz * salmo:documents/workshop-presentations/nada-talk/

and expected only those files not in the workstation subdirectory to be
copied. However, not only were those files copied, but two older files (the
.lyx and .pdf for the presentation) overwrote the newer ones.

   What rsync syntax error did I commit?

Rich




More information about the PLUG mailing list