[Top][All Lists]

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

Re: [Bug-tar] [Q] control symlink creation time in tar archive ?

From: Paul Eggert
Subject: Re: [Bug-tar] [Q] control symlink creation time in tar archive ?
Date: Tue, 14 Dec 2004 11:05:03 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Hidehiko Nitta <address@hidden> writes:

> I am trying to extract symlinks as symlink with same
> creation time as original from a tar archive. But, I always
> get the creation time updated to a time of extraction.
> Actually, I see a creation time is preserved in tar archive itself.
> Is there any way to realize this inside gtar or outside gtar
> after extraction on UNIX (Solaris) ?

Not on Solaris, no.  You need an operating system with the lutimes
system call, or something equivalent to that.  Solaris 9 doesn't
have that.

FreeBSD does have lutimes, but GNU tar doesn't yet support operating
systems that have lutimes.  There's a similar problem with the mode
bits of a symlink, and the lchmod function.  GNU tar doesn't yet
support that either.  Again, this doesn't matter for Solaris, which
lacks lchmod, but it does matter for operating systems like FreeBSD.

While we're on the subject, GNU tar should support restoring file time
stamps to sub-second resolution at some point.

I added the following to tar/TODO:

* Add support for restoring file time stamps to sub-second resolution,
  if the file system supports this.

* Add support for restoring the attributes of symbolic links, for
  OSes like FreeBSD that have the lutimes and lchmod functions.

> My gnu tar version is below.
> tar (GNU tar) 1.12

1.12 is pretty old these days; I suggest upgrading to 1.14.

reply via email to

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