The behavior of "-u/--update" option on directories

Florian-Daniel Otel otel at ce.chalmers.se
Tue Jan 14 22:14:29 EST 2003



Aaron W Morris writes:
> > 
> > Truth to be told, after a bit of thinking I _might_ accept the fact
> > that "--update" ignores the timestamps on (sub)directories. Because
> > if it didn't, if any file was "touch"-ed remotely after the last rsync
> > than all subdirs,  up to and including to the "top" dir, would have a
> > newer timestamp remotely and thus no file putting would take place.
> 
> This is usually the case, however, not always true.  It is possible for
> a file to have a newer timestamp then the directory it is contained
> within.  If we used your logic below, then a file with a newer timestamp
> (possibly changed data) on the source would not be transferred to the
> remote machine if the source directory's timestamp did not change.

Hmm..well, while a possible scenario for that to happen doesn't come
right off the bat, I cannot disagree with you there. Still, I find
this as a rather shoddy justification for the present behavior of the
--update (i.e. the fact that in effect the timestamps on
(sub)directories are practically ignored). Frankly, I would rather
want to have the choice.

To get a bit more constructive: Any idea how can I simulate the
behavior I want ? Or am I simply left w/ the option (sic!) of voicing
this as an (exotic ?!?!?) wishlist item  :) ?

Thanks anyway,

Florian



More information about the rsync mailing list