[comp.sys.3b1] TAR on 3b1

forrie@morwyn.UUCP (Forrie Aldrich) (06/27/91)

I have the development set 3.51 installed... in many messages and so 
forth on the net, I have seen the tar command invoked as:

	zcat file.tar.Z | tar xvf -

whereby it doesn't require you to uncompress the file first before 
extracting it's contents.  Well, after many trials, I cannot seem 
to get the 3b1 tar command to cooperate with this approach, and I 
wonder if anyone out there has a solution to this issue.

I tried to get the GNU tar command to compile on this machine with
absolutely no luck, so that's out (unless someone else got lucky).

It's a real pain to have to uncompress LARGE files first in order
to extract the contents...  if you know what I mean.

Thanks,

Forrie

-- 

--------------------=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--------------------
Forrest Aldrich, Jr.|   (a reliable path here someday)   |forrie@morwyn.UUCP
                    |           <email paths>            | 
CREATIVE CONNECTIONS|  uunet!virgin!unhtel!morwyn!forrie |Graphic Illustration
------------------\-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=/------------------
                   \___ PO Box 1541 - Dover, NH  03820 ___/                   

thad@public.BTR.COM (Thaddeus P. Floryan) (06/27/91)

In article <136@morwyn.UUCP> forrie@morwyn.UUCP (Forrie Aldrich) writes:
| I have the development set 3.51 installed... in many messages and so 
| forth on the net, I have seen the tar command invoked as:
| 
| 	zcat file.tar.Z | tar xvf -
| 
| whereby it doesn't require you to uncompress the file first before 
| extracting it's contents.  Well, after many trials, I cannot seem 
| to get the 3b1 tar command to cooperate with this approach, and I 
| wonder if anyone out there has a solution to this issue.
| [...]

I use that command form for tar all the time, and it works fine (esp. since
I simply haven't the disk space to unpack some of the mongo compressed tar
files I collect from around the net.

There *IS* a chance you may have some weirdo version, so check your tar
against the following:


$ path tar
/usr/bin/tar
$ ll /usr/bin/tar
-rwxr-xr-x  1 bin     bin       10792 Dec 22  1987 /usr/bin/tar
$ size /usr/bin/tar
7236(.text) + 1576(.data) + 10868(.bss) + 0(.lib) = 19680
$ sum /usr/bin/tar
31709 11 /usr/bin/tar
$ coffdate /usr/bin/tar
Sat Apr 18 17:28:49 1987  /usr/bin/tar

Thad Floryan [ thad@btr.com (OR) {decwrl, mips, fernwood}!btr!thad ]

tkacik@hobbes.cs.gmr.com (Tom Tkacik CS/50) (06/27/91)

In article <136@morwyn.UUCP>, forrie@morwyn.UUCP (Forrie Aldrich) writes:
|> I have the development set 3.51 installed... in many messages and so 
|> forth on the net, I have seen the tar command invoked as:
|> 
|> 	zcat file.tar.Z | tar xvf -
|> 
|> whereby it doesn't require you to uncompress the file first before 
|> extracting it's contents.  Well, after many trials, I cannot seem 
|> to get the 3b1 tar command to cooperate with this approach, and I 
|> wonder if anyone out there has a solution to this issue.

The tar on the 3b1 (like all SYSV tar's) does not make you owner of
the files by default.  To do this you must include -o:

	zcat file.tar.Z | tar xvof -

This always works for me.  Otherwise tar creates the directory but will
not unpack any of the files because you do not own the directory, and
you do not have write permission into the directory.

|> It's a real pain to have to uncompress LARGE files first in order
|> to extract the contents...  if you know what I mean.

Do you mean that:

	uncompress file.tar.Z
	tar xvf file.tar

does work?  The above will not fix it then.  I have never seen this work
if the above did not also work.  What error message is tar giving you?

--
Tom Tkacik
GM Research Labs
tkacik@hobbes.cs.gmr.com
tkacik@kyzyl.mi.org

tom@sco.COM (Tom Kelly) (06/28/91)

In article <136@morwyn.UUCP>, forrie@morwyn.UUCP (Forrie Aldrich) writes
about problems with

> |> 	zcat file.tar.Z | tar xvf -
> |> 

In <57141@rphroy.UUCP> tkacik@hobbes.cs.gmr.com (Tom Tkacik CS/50) writes:

> The tar on the 3b1 (like all SYSV tar's) does not make you owner of
> the files by default.  To do this you must include -o:
> 
> 	zcat file.tar.Z | tar xvof -
> 
> Do you mean that:
> 
> 	uncompress file.tar.Z
> 	tar xvf file.tar
> 
> does work?  The above will not fix it then.  I have never seen this work
> if the above did not also work.  What error message is tar giving you?

I have seen the behaviour that Forrie has complained about.  There
is no message from tar, it just hangs.  (This problem is independent
of the ownership problem, which is solved with -o as Tom said).
I don't know if the problem is with the pipe, or tar's handling of
standard input, but I suspect the pipe.  I have largely switched
to cpio, and find that it works fine with a pipe.

Tom Kelly (scocan!ancill!tom)

vancleef@iastate.edu (Van Cleef Henry H) (06/29/91)

In article <1991Jun28.120929.24594@sco.COM> tom@sco.COM (Tom Kelly) writes:
>In article <136@morwyn.UUCP>, forrie@morwyn.UUCP (Forrie Aldrich) writes
>about problems with
>
>> |> 	zcat file.tar.Z | tar xvf -
>> |> 
>
>> if the above did not also work.  What error message is tar giving you?
>
>I have seen the behaviour that Forrie has complained about.  There
>is no message from tar, it just hangs.  (This problem is independent
>of the ownership problem, which is solved with -o as Tom said).
>I don't know if the problem is with the pipe, or tar's handling of
>standard input, but I suspect the pipe.  I have largely switched
>to cpio, and find that it works fine with a pipe.
>
>Tom Kelly (scocan!ancill!tom)

I have seen this problem with files tarred and compressed on a
DECstation under Ultrix 4.1.  The pipe hangs.  Solution is to
uncompress the file first, then untar it.  Finding a real fix is 
one more round-tuit project.
-- 
Hank van Cleef  
vancleef@iastate.edu	Iowa State University, Ames. Ia.
tmn!vancleef		The Union Institute, Cincinnati, Oh.

forrie@morwyn.UUCP (Forrie Aldrich) (06/29/91)

tom@sco.COM (Tom Kelly) writes:

| I have seen the behaviour that Forrie has complained about.  There
| is no message from tar, it just hangs.  (This problem is independent
| of the ownership problem, which is solved with -o as Tom said).
| I don't know if the problem is with the pipe, or tar's handling of
| standard input, but I suspect the pipe.  I have largely switched
| to cpio, and find that it works fine with a pipe.
[ ... ]

Thank you!  Now I know I'm not crazy... ;)

Forrie
-- 

--------------------=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--------------------
Forrest Aldrich, Jr.|   (a reliable path here someday)   |forrie@morwyn.UUCP
                    |           <email paths>            | 
CREATIVE CONNECTIONS|  uunet!virgin!unhtel!morwyn!forrie |Graphic Illustration
------------------\-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=/------------------
                   \___ PO Box 1541 - Dover, NH  03820 ___/                   

roger@booth.uucp (Roger Abrahams) (06/29/91)

In article <1991Jun28.120929.24594@sco.COM> tom@sco.COM (Tom Kelly) writes:
>In article <136@morwyn.UUCP>, forrie@morwyn.UUCP (Forrie Aldrich) writes
>about problems with
>
>> |> 	zcat file.tar.Z | tar xvf -
>> |> 
>
>In <57141@rphroy.UUCP> tkacik@hobbes.cs.gmr.com (Tom Tkacik CS/50) writes:
>
>> The tar on the 3b1 (like all SYSV tar's) does not make you owner of
>> the files by default.  To do this you must include -o:
>> 
>> 	zcat file.tar.Z | tar xvof -
>> 
>> Do you mean that:
>> 
>> 	uncompress file.tar.Z
>> 	tar xvf file.tar
>> 
>> does work?  The above will not fix it then.  I have never seen this work
>> if the above did not also work.  What error message is tar giving you?
>
>I have seen the behaviour that Forrie has complained about.  There
>is no message from tar, it just hangs.  (This problem is independent
>of the ownership problem, which is solved with -o as Tom said).
>I don't know if the problem is with the pipe, or tar's handling of
>standard input, but I suspect the pipe.  I have largely switched
>to cpio, and find that it works fine with a pipe.
>
>Tom Kelly (scocan!ancill!tom)

It is a well know problem that the "tar" supplied with the Unix-PC will
hang in a pipe IF you are "root" and after attempting to make a directory 
that is missing in the output.  You then must interrupt the tar process and 
re-start it, at which point the directory will be there and tar can put 
the files into it.  It will stop again when it has to make another 
directory that is missing.

Note that this only happens if you are "root" (or have an id of 0) and 
are in a pipe.

This is really strange, as you could make a case for the opposite conditions.

I am also not sure that this is the behavior Forrie describes, as tar will
do something (at least make 1 directory) and, if there were no directories
to make, would appear to work fine.

						- Roger@booth.uucp

forrie@morwyn.UUCP (Forrie Aldrich) (06/30/91)

vancleef@iastate.edu (Van Cleef Henry H) writes:
| I have seen this problem with files tarred and compressed on a
| DECstation under Ultrix 4.1.  The pipe hangs.  Solution is to
| uncompress the file first, then untar it.  Finding a real fix is 
| one more round-tuit project.
[ ... ]

Regarding the problem with 'zcat file.tar | tar xovf -' ...

Well, there have been others who have responded via email to me that claim
not to have this problem with their stock TAR program, and others who say
they DO... SO, my solution was to simply try another tar program.  What
I did was retrieved the tar-1.10beta.tar.Z file from prep.ai.mit.edu in
/pub/gnu and compiled it.  THEN I tried the above and it works fine.

Someone also sent me the output of the 'what' command on the TAR command
file.  And I notcied a difference of TIMES that the original was created,
so maybe that's the problem, who knows.

Forrie
-- 

--------------------=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--------------------
Forrest Aldrich, Jr.|   (a reliable path here someday)   |forrie@morwyn.UUCP
                    |           <email paths>            | 
CREATIVE CONNECTIONS|  uunet!virgin!unhtel!morwyn!forrie |Graphic Illustration
------------------\-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=/------------------
                   \___ PO Box 1541 - Dover, NH  03820 ___/                   

floyd@hayes.ims.alaska.edu (Floyd Davidson) (06/30/91)

In article <1991Jun28.220436.29284@news.iastate.edu> vancleef@iastate.edu (Van Cleef Henry H) writes:
>In article <1991Jun28.120929.24594@sco.COM> tom@sco.COM (Tom Kelly) writes:
>>In article <136@morwyn.UUCP>, forrie@morwyn.UUCP (Forrie Aldrich) writes
>>about problems with
>>
>>> |> 	zcat file.tar.Z | tar xvf -
>>> |> 

[...]

>>is no message from tar, it just hangs.  (This problem is independent
...
>>standard input, but I suspect the pipe.  I have largely switched
>>to cpio, and find that it works fine with a pipe.
>>
>>Tom Kelly (scocan!ancill!tom)
>
>I have seen this problem with files tarred and compressed on a
>DECstation under Ultrix 4.1.  The pipe hangs.  Solution is to
>uncompress the file first, then untar it.  Finding a real fix is 
>one more round-tuit project.

Pax seems to work well as a tar replacement, though its cpio
and pax variations have some bugs.

GNU tar version 1.10beta is also available.  It definitely will
compile and seems to work fine, though I haven't had it long
enough to say it has no problems.

Floyd
-- 
Floyd L. Davidson   | Alascom, Inc. pays me, |UA Fairbanks Institute of Marine
floyd@ims.alaska.edu| but not for opinions.  |Science suffers me as a guest.