Re: cp -a not preserving timestamps on symlinks
Alan Ford <[email protected]> Tue, 27 May 2003 10:52:07 +0100
| Newsgroups | gmane.comp.gnu.fileutils.bugs |
|---|---|
| Message-ID | <[email protected]> |
On Mon, May 26, 2003 at 11:51:25PM -0600, Bob Proulx wrote: > 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. OK, thanks. I was expecting it to be something like that. I guess the chances of such a function ever being implemented is roughly equivalent to a porcine aviation school opening down the street? :) > 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? In one situation I work in, there is a bin directory that is full of hundreds of symlinks pointing to the places where the apps are actually installed. Every year or so I end up moving this setup to a bigger hard disk, and it just annoys me to lose the history of when apps were linked in, what recent changes were, etc. (I know I could follow the links, but it's more inconvenient, and also not useful in some of the situations). Thanks for the reply, anyway. Regards, -- Alan Ford * [email protected]