GNU bug report logs -
#7529
Bug#605639: deal better with different filesystem timestamp resolutions
Previous Next
Full log
View this message in rfc822 format
X-Debbugs-cc: bug-coreutils <at> gnu.org, bug-make <at> gnu.org
Package: coreutils
Version: 8.5-1
man cp says:
`-u'
`--update'
Do not copy a non-directory that has an existing destination with
the same or newer modification time. If time stamps are being
preserved, the comparison is to the source time stamp truncated to
the resolutions of the destination file system and of the system
calls used to update time stamps; this avoids duplicate work if
several `cp -pu' commands are executed with the same source and
destination.
But it seems that isn't working too much/well,
$ touch /tmp/f
$ /bin/cp -avu /tmp/f .
`/tmp/f' -> `./f'
$ /bin/cp -avu /tmp/f .
`/tmp/f' -> `./f'
$ /bin/cp -avu /tmp/f .
`/tmp/f' -> `./f'
$ ls -l --full-time f /tmp/f
-rw-r--r-- 1 jidanni jidanni 0 2010-12-02 08:25:47.682527260 +0800 /tmp/f
-rw-r--r-- 1 jidanni jidanni 0 2010-12-02 08:25:47.000000000 +0800 f
$ mount
/dev/sda6 on /home type ext3 (rw)
tmpfs on /tmp type tmpfs (rw)
It might work great f -> /tmp/f, but not the other way around.
By the way, make(1) lacks any of this time comparison resolution
machinery at all! I'll CC them.
This bug report was last modified 6 years and 264 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.