rsync and the file's mtime
jbearer at pittsburghlive.com
Sun Nov 24 15:47:00 EST 2002
I'm trying to write a script that runs rsync to pull files and then
detect which ones of them have changed. The problem is when I run rsync
without the -t flag the mtime gets updated every run, not only when the
file changes. It this a bug, by design, or un-avoidable?
My plan was to use the -N bash file test operator to check to see if the
file had been accessed since it have been modified. But with the mtime
always getting updated it always returns true.
Is there any way to make rsync behave as desired? If not, how else can I
detect which files have changed?
Jeff Bearer, RHCE
Winner 2002 Eppy Award, Best U.S. Newspaper Website
More information about the rsync