UNTAR gives misleading messages

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
I UNTAR'd a file. According to UNTAR's messages, all files were extracted to the current directory (see below). They were, in fact, extracted into an appropriate directory tree.

Code:
v:\tcsh> untar tcsh-6.18.01.tar
=> V:\tcsh\tcsh-6.18.01
=> V:\tcsh\BUGS
SNIP
=> V:\tcsh\stubdll.c
=> V:\tcsh\test.c
 
v:\tcsh> d
2012-09-16  00:04        <DIR>    tcsh-6.18.01
2012-02-13  16:34      3,962,880  tcsh-6.18.01.tar
2012-02-13  00:00        926,872  tcsh-6.18.01.tar.gz
 
v:\tcsh> tree tcsh-6.18.01\
 
V:\tcsh\tcsh-6.18.01\
├──config
├──cygwin
├──nls
│  ├──C
│  ├──et
│  ├──finnish
│  ├──french
│  ├──german
│  ├──greek
│  ├──italian
│  ├──ja
│  ├──pl
│  ├──russian
│  ├──spanish
│  └──ukrainian
├──tests
└──win32
  └──msg
 

rconn

Administrator
Staff member
May 14, 2008
10,162
86
#2
I UNTAR'd a file. According to UNTAR's messages, all files were extracted to the current directory (see below). They were, in fact, extracted into an appropriate directory tree.
The correct syntax for what you're trying to do is:

untar /d tcsh-6.18.01.tar

There is a bug in the zip dll that is causing the tar contents to *not* be written to the current directory when you don't specify /D (i.e., the display output is right, but the contents are erroneously extracted to the subdirectory). I've added a workaround for the next build.
 
#3
I think what vefatica was reporting was that the files were properly extracted to the correct subdirectories, but the extraction messages indicated everything was extracted to the main folder (the problem being with the messages, not the extraction location). Either way, it looks like you've got a handle on it.
 

rconn

Administrator
Staff member
May 14, 2008
10,162
86
#4
I think what vefatica was reporting was that the files were properly extracted to the correct subdirectories, but the extraction messages indicated everything was extracted to the main folder (the problem being with the messages, not the extraction location). Either way, it looks like you've got a handle on it.
The files were *not* extracted properly -- since he didn't specify /D, everything should have gone into the current directory. The messages were correct; the results were not.