GNU bug report logs -
#9277
cp
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Wed, 10 Aug 2011 13:09:52 -0600
with message-id <4E42D780.3070000 <at> redhat.com>
and subject line Re: bug#9277: cp
has caused the GNU bug report #9277,
regarding cp
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
9277: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9277
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
cp -a src/{a,b,c} dest does NOT preserve the time stamp on symbolic links.
I understand that neither does 'tar' , but that probably is a fault, not a
feature there either.
Thanx!
vess
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
On 08/10/2011 12:40 PM, vesselin kavalov wrote:
> cp -a src/{a,b,c} dest does NOT preserve the time stamp on symbolic links.
Thanks for the report, but you are missing some details. What version
of coreutils? What operating system? And assuming Linux, what kernel
version?
Be aware that symlink timestamp preservation requires the use of
futimens or utimensat, which were only recently standardized by POSIX
2008, and which are lacking on a lot of older systems; plus, being new
interfaces, they require newer coreutils that actually takes advantage
of the newer interfaces. Also be aware that symlink timestamps are
worthless - there's generally not much you can usefully do with them,
whether or not you have the flexibility of modifying them.
At any rate, things work for me, using kernel 2.6.35 and coreutils 8.5
(the defaults of Fedora 14):
$ ln -s a b
$ sleep 20
$ cp -a b c
$ stat b c
File: `b' -> `a'
Size: 1 Blocks: 0 IO Block: 4096 symbolic link
Device: fd02h/64770d Inode: 266785 Links: 1
Access: (0777/lrwxrwxrwx) Uid: (14986/ eblake) Gid: (14986/ eblake)
Access: 2011-08-10 13:04:42.420640012 -0600
Modify: 2011-08-10 13:04:34.308611690 -0600
Change: 2011-08-10 13:04:34.308611690 -0600
File: `c' -> `a'
Size: 1 Blocks: 0 IO Block: 4096 symbolic link
Device: fd02h/64770d Inode: 304795 Links: 1
Access: (0777/lrwxrwxrwx) Uid: (14986/ eblake) Gid: (14986/ eblake)
Access: 2011-08-10 13:04:59.771700484 -0600
Modify: 2011-08-10 13:04:34.308611690 -0600
Change: 2011-08-10 13:04:57.174691438 -0600
Note that atime and mtime were indeed preserved. Therefore, I'm closing
this bug unless you can provide more details about any bugs still remaining.
>
> I understand that neither does 'tar' , but that probably is a fault, not a
> feature there either.
Wrong again. The latest tar, coupled with the latest kernel, does
support symlink timestamps.
--
Eric Blake eblake <at> redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
This bug report was last modified 14 years and 7 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.