[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tar version 1.13.25
From: |
Robert Singleton |
Subject: |
tar version 1.13.25 |
Date: |
Wed, 24 Jul 2002 01:35:04 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20011126 Netscape6/6.2.1 |
Hello,
I'm using GNU tar version 1.13.25 from my distribution of
Red Hat Linux 7.3. I have noticed that tar does not preserve
the time-stamp for symbolic links. I have read the man page
and the GNU tar documentation thoroughly, and I have not seen
this problem mentioned, and none of the flags I have experimented
with help. The closest was the "-h" option. I would appreciate
any suggestion you could provide on how I can preserve the original
time-stamp for symbolic links.
Thanks very much.
Robert Singleton
Los Alamos National Lab
--
Note: To clarify things, the following is an explicit example
of my problem. Suppose I have two regular files, "albemuth1"
and "albemuth2", and a symbolic link "albemuth" to "albemuth1":
lrwxrwxrwx 9 Jul 23 23:53 albemuth -> albemuth1
-rw-rw-r-- 4 Jul 23 00:28 albemuth1
-rw-rw-r-- 4 Jul 23 00:28 albemuth2
I now will create the following tar-file:
% tar cf test.tar albemuth1 albemuth2 albemuth
Examining the tar-file reveals that the time stamps are intact:
% tar tvf test.tar
-rw-rw-r-- 4 2002-07-23 00:28:21 albemuth1
-rw-rw-r-- 4 2002-07-23 00:28:21 albemuth2
lrwxrwxrwx 0 2002-07-23 23:53:02 albemuth -> albemuth1
However, upon moving the tar-file to another directory and extracting,
preserves the time stamp on "albemuth1" and "albemuth2", but not
on the link "albemuth". The latter obtains the time of extraction
instead. For example, it is right now 1:14 am on 24-Jul-02, and
here is the result of extracting the files from test.tar:
% tar xf test.tar
% ls -l
lrwxrwxrwx 9 Jul 24 01:15 albemuth -> albemuth1
-rw-rw-r-- 4 Jul 23 00:28 albemuth1
-rw-rw-r-- 4 Jul 23 00:28 albemuth2
-rw-rw-r-- 10240 Jul 24 01:14 test.tar
You see that "albemuth1" and "albemuth2" retained their time
stamps, but that "albemuth" was given the time of extraction.
- tar version 1.13.25,
Robert Singleton <=