bug-tar
[Top][All Lists]
Advanced

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

[Bug-tar] [GNU tar 1.24] empty dir and option -C


From: Denis Excoffier
Subject: [Bug-tar] [GNU tar 1.24] empty dir and option -C
Date: Mon, 25 Oct 2010 21:50:15 +0200

Hello list,

If you have an empty dir stored in the tar file and you
extract using -C, you get an error message and the
empty dir is *not* restored.

I tried on Solaris 8 and 10, Cygwin, Darwin and Linux
Ubuntu, all with the same effect.

Details below. Thank you for your help.

Regards.

Denis Excoffier.


jupiter% tar --version | head -1
tar (GNU tar) 1.24
jupiter% rm -rf 1 1.tar i1 i2jupiter% mkdir 1
jupiter% mkdir 1/2
jupiter% touch 1/3
jupiter% tar -c -vv --full-time -f 1.tar 1
drwxr-xr-x myuser/mygroup       0 2010-10-25 11:31:01.896191 1/
drwxr-xr-x myuser/mygroup       0 2010-10-25 11:31:01.891191 1/2/
-rw-r--r-- myuser/mygroup       0 2010-10-25 11:31:01.896192 1/3
jupiter% tar -t -vv --full-time -f 1.tar
drwxr-xr-x myuser/mygroup       0 2010-10-25 11:31:01 1/
drwxr-xr-x myuser/mygroup       0 2010-10-25 11:31:01 1/2/
-rw-r--r-- myuser/mygroup       0 2010-10-25 11:31:01 1/3


jupiter% mkdir i1
jupiter% tar -x -vv --full-time -f 1.tar -C i1
drwxr-xr-x myuser/mygroup       0 2010-10-25 11:31:01 1/
drwxr-xr-x myuser/mygroup       0 2010-10-25 11:31:01 1/2/
drwxr-xr-x                     Creating directory: 1
-rw-r--r-- myuser/mygroup       0 2010-10-25 11:31:01 1/3
tar: 1/2: Cannot utime: No such file or directory
tar: 1/2: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
jupiter% find i1 -ls
747188    4 drwxr-xr-x   3 myuser  mygroup          4096 Oct 25 11:31 i1
747189 4 drwxr-xr-x 2 myuser mygroup 4096 Oct 25 11:31 i1/1 747190 0 -rw-r--r-- 1 myuser mygroup 0 Oct 25 11:31 i1/1/3



jupiter% mkdir i2
jupiter% (cd i2; tar -x -vv --full-time -f ../1.tar)
drwxr-xr-x myuser/mygroup       0 2010-10-25 11:31:01 1/
drwxr-xr-x myuser/mygroup       0 2010-10-25 11:31:01 1/2/
-rw-r--r-- myuser/mygroup       0 2010-10-25 11:31:01 1/3
jupiter% find i2 -ls
747191    4 drwxr-xr-x   3 myuser  mygroup          4096 Oct 25 11:31 i2
747192 4 drwxr-xr-x 3 myuser mygroup 4096 Oct 25 11:31 i2/1 747193 4 drwxr-xr-x 2 myuser mygroup 4096 Oct 25 11:31 i2/1/2 747194 0 -rw-r--r-- 1 myuser mygroup 0 Oct 25 11:31 i2/1/3


jupiter% rm -rf 1 1.tar i1 i2




reply via email to

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