bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cp -a not preserving timestamps on symlinks


From: Bob Proulx
Subject: Re: cp -a not preserving timestamps on symlinks
Date: Mon, 26 May 2003 23:51:25 -0600
User-agent: Mutt/1.3.28i

Alan Ford wrote:
> I'm not sure if this is a bug or a limitation, but I'm reporting this
> because I could find no mention of it in man pages etc.

It is a kernel limitation.

> When using cp -a, it doesn't preserve the timestamps of the symlinks.

For kernel calls like stat(2) there is lstat(2).  But there is no
lutime(2) equivalent for utime(2).  Therefore there is no way to
change the times on a symlink.

But user, group, permissions, times, etc. of a symlink are completely
cosmetic.  Which is why these have been ignored by the kernel.

> This is very annoying for backup purposes.

Hmm...  Not sure why.  Could you elaborate?

> Is there any way around this, or is it a legitimate bug?
> Indeed, come to think of it, touch can't change timestamps on symlinks
> either. Is this just not possible? I don't see any mention of such
> limitations on man pages such as utime(2), though.

Symlinks are designed to be completely transparent.  Normally anything
that affects them just pushes through the symlink and causes the
affect to be taken on the final resolved file.

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]