I'm doing some synching with rsync using:
rsync --rLvv --times --size-only
For my initial sync. My idea, now is to use:
rsync --rLvv --times
To synch files that have a new modified time. My problem is that after the initial rsync, I see the following Modified times on the files that have been synced:
remote$ stat 6080_04_big.mp4 File: `6080_04_big.mp4' Size: 258788267 Blocks: 505448 IO Block: 4096 regular file Device: 903h/2307d Inode: 862897 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 2000/ht) Gid: ( 2000/ cust) Access: 2010-08-13 10:46:20.000000000 -0700 Modify: 2010-08-12 17:55:08.000000000 -0700 Change: 2010-08-13 10:46:20.205721673 -0700
local$ stat 6080_04_big.mp4 File: `6080_04_big.mp4' Size: 258788267 Blocks: 505448 IO Block: 4096 regular file Device: 902h/2306d Inode: 136015 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 506/ admin) Gid: ( 506/ admin) Access: 2010-08-12 20:55:01.482104000 -0400 Modify: 2010-08-12 20:55:08.468122000 -0400 Change: 2010-08-12 21:15:06.952810711 -0400
The modify time is 'effectively' the same, but only down to the second. What's the resolution of the comparison here? It seems that anything that is the same up to the second is considered the same, but I can't find any docs specifying this. Anyone know off the top of their heads?
Best Answer
Here's me answering my own question:
rsync uses the utime() call which sets the modification time of a file down to 1 second resolution. So, effectively, files that are the same up to the second, are considered the same for the time comparison piece of rsync's checks.