[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tar bug.. Replces the link or do not overwrites the file
From: |
Ramakrishna_Manchale |
Subject: |
tar bug.. Replces the link or do not overwrites the file |
Date: |
Thu, 15 May 2003 19:53:08 +0530 |
Hello,
We have the Linux version
uname -a
Linux manu 2.2.14-12smp #1 SMP Tue Apr 25 12:58:06 EDT 2000 i686 unknown.
We are facing the problem in using the tar command.
We need the tar functionality as in unix systems. In linux it is different.
Problem:
We have file structure with parent directory, child directory and many
files in the child directory.
Now i get a tar file having the same parent directory, child directory, and
updated version of existing files + new files.
The first parent directory is a symbolic link.
Example:
cd $MASTER
$ ls -l
lrwxrwxrwx 1 test tech 40 May 15 19:02 ABRC ->
/data01/test/IMAGE_TEST/PAS2003.1.1/ABRC
lrwxrwxrwx 1 test tech 40 May 12 17:36 ARMC ->
/data01/test/IMAGE_TEST/PAS2003.1.1/ARMC
lrwxrwxrwx 1 test tech 40 May 12 17:36 HOLT ->
/data01/test/IMAGE_TEST/PAS2003.1.1/HOLT
lrwxrwxrwx 1 test tech 40 May 12 17:36 JAEI ->
/data01/test/IMAGE_TEST/PAS2003.1.1/JAEI
cd ABRC
ls -l
lrwxrwxrwx 1 test tech 52 May 12 17:36 ABRCS00486 ->
/data01/te
st/IMAGE_TEST/PAS2003.3.1V/ABRC/ABRCS00486
lrwxrwxrwx 1 test tech 52 May 15 19:06 ABRCS00487 ->
/data01/te
st/IMAGE_TEST/PAS2003.3.1V/ABRC/ABRCS00487
lrwxrwxrwx 1 test tech 52 May 12 17:36 ABRCS00488 ->
/data01/te
st/IMAGE_TEST/PAS2003.3.1V/ABRC/ABRCS00488
cd ABRCS00487
ls -l
-rw-r--r-- 1 test tech 37553 May 12 17:39 ABRCS00487-1.pdf
Now,
I have a tar file which untars as follows.
cd $MASTER
tar -tvf ABRC.tar
drwxrwxr-x test/tech 0 2003-05-12 17:39:32 ABRC/
drwxr-xr-x test/tech 0 2003-05-12 17:39:32 ABRC/ABRCS00487/
-rw-r--r-- test/tech 47553 2003-05-12 17:39:32
ABRC/ABRCS00487/ABRCS00487-1.
pdf
When i use tar -xvf of the file at parent directory, on unix system, it
replaces the existing files, and copies the new files byte count [ 37553 ].
But in linux
cd $MASTER
tar -xvf ABRC.tar
drwxr-xr-x 3 test tech 4096 May 12 17:39 ABRC
-rw-rw-r-- 1 test tech 40960 May 15 11:14 ABRC.tar
lrwxrwxrwx 1 test tech 40 May 12 17:36 ARMC ->
/data01/test/IMA
GE_TEST/PAS2003.1.1/ARMC
lrwxrwxrwx 1 test tech 40 May 12 17:36 HOLT ->
/data01/test/IMA
GE_TEST/PAS2003.1.1/HOLT
lrwxrwxrwx 1 test tech 40 May 12 17:36 JAEI ->
/data01/test/IMA
GE_TEST/PAS2003.1.1/JAEI
cd ABRC
ls -l
drwxr-xr-x 2 test tech 4096 May 12 17:39 ABRCS00487
The link is replaced by the contents in the tar file.
On using the -k --keep-old-files
option, it will not break the link but, do not over write the old file.
Please suggest any solution.
Rgds,
Ramakrishna
- tar bug.. Replces the link or do not overwrites the file,
Ramakrishna_Manchale <=