Operating System - HP-UX
1820881 Members
3670 Online
109628 Solutions
New Discussion юеВ

tar -xzf equiv Problems with pipes in HP-UX

 
SOLVED
Go to solution
Jeff Sadowski_2
Frequent Advisor

tar -xzf equiv Problems with pipes in HP-UX

Ok I wanted to try this out in most POSIX OS's pipes are done on the fly. If HP-UX is doing this why is the following not working

[root@rx2600 working]$gunzip -c \
/working/B.11.23_archive.gz | tar -xf -
/working/B.11.23_archive.gz: Value too large to be stored in data type
Tar: blocksize = 0; broken pipe?

This seems to work with small files.
A pipe isn't suppose to store all of what it is being fed. Its suppose to send it through to the other program hence the name pipe. What is going on.
11 REPLIES 11
Patrick Wallek
Honored Contributor

Re: tar -xzf equiv Problems with pipes in HP-UX

I can't explain why that is working, but have you tried gzcat instead?

Try this:

gzcat /working/B.11.23_archive.gz | tar -xf -

I have used the above successfully on gzip files of more than 1GiB in size.
Jeff Sadowski_2
Frequent Advisor

Re: tar -xzf equiv Problems with pipes in HP-UX

[root@rx2600 test]$gzcat /working/B.11.23_archive.gz.files | tar -xf -
/working/B.11.23_archive.gz.files: Value too large to be stored in data type
Tar: blocksize = 0; broken pipe?

Same issue I really think its a problem with pipes in HP-UX and if it is how do I report this bug? This is most definitely a breaking of POSIX. This works for a small file but not for an ignite backup
Jeff Sadowski_2
Frequent Advisor

Re: tar -xzf equiv Problems with pipes in HP-UX

test that it works on small files

[root@rx2600 test]$ echo test > test.txt
[root@rx2600 test]$ tar -cf - test.txt | gzip -f - > test.tar.gz
[root@rx2600 test]$ rm test.txt
[root@rx2600 test]$ gzcat test.tar.gz | tar -xf -
[root@rx2600 test]$ cat test.txt
test

mine also worked

[root@rx2600 test]$ rm test.txt
[root@rx2600 test]$ gunzip -c test.tar.gz | tar -xf -
[root@rx2600 test]$ cat test.txt
test
Jeff Sadowski_2
Frequent Advisor

Re: tar -xzf equiv Problems with pipes in HP-UX

[root@rx2600 test]$ gunzip B.11.23_archive.gz
B.11.23_archive.gz: Value too large to be stored in data type
Jeff Sadowski_2
Frequent Advisor

Re: tar -xzf equiv Problems with pipes in HP-UX

that proves it isn't quite like I thought it is not a pipe issue it is a gunzip issue.
Steven Schweda
Honored Contributor
Solution

Re: tar -xzf equiv Problems with pipes in HP-UX

> [...] it is not a pipe issue it is a gunzip
> issue.

Apparently. So, what are you using for
"gunzip"/"gzcat"/"gzip"?

There's a reference to a 1.3.x version of
"gzip" which is supposed to be large-file
capable, at:

http://www.gzip.org/

I haven't done much with gzip and large
files, but it's also just possible that it
would work if gzip never actually saw the
file. For example:

cat archive.gz | gzip -cd | tar -xf -
Jeff Sadowski_2
Frequent Advisor

Re: tar -xzf equiv Problems with pipes in HP-UX

thank you thank you thank you :-)
Steven Schweda
Honored Contributor

Re: tar -xzf equiv Problems with pipes in HP-UX

> thank you thank you thank you :-)

If that was meant to imply that "cat" made
the difference, blame a Google search for:

gzip "Value too large to be stored in data type"

There seems to be a bunch of useful info on
this new inter-web thing.
Jeff Sadowski_2
Frequent Advisor

Re: tar -xzf equiv Problems with pipes in HP-UX

yes cat worked
hmm thats odd I googled the same and got only japanese stuff that I couldn't read.
Dennis Handly
Acclaimed Contributor

Re: tar -xzf equiv Problems with pipes in HP-UX

Can you break it down to figure out which pipe component is giving the error? It seems it is gunzip that has the problem, since that is the name in the message. How big is B.11.23_archive.gz?

If this is over 2 Gb, then the problem is with the non-supported gunzip. Unless a newer version supports large files??
Jeff Sadowski_2
Frequent Advisor

Re: tar -xzf equiv Problems with pipes in HP-UX

it was a problem of opening a file directly with gunzip or gzip to get around it I used pipes with cat and it all worked as it should