1820486 Members
2134 Online
109624 Solutions
New Discussion юеВ

guzip, tar e broken pipe

 
Luca_11
Occasional Contributor

guzip, tar e broken pipe

Hi all,
when I execute
gnzip -c myfile.tgz | tar xf -
I have this output:
myfile: unknown error
tar: block size=0 ; broken pipe ?

somebody can help me?

thanks
Luca
6 REPLIES 6
Joaquin Gil de Vergara
Respected Contributor

Re: guzip, tar e broken pipe

try

# gunzip myfile.tar.gz
# tar xvf myfile.tar
Teach is the best way to learn
Rodney Hills
Honored Contributor

Re: guzip, tar e broken pipe

Luca,

Looks like myfile.tgz is not a proper gzip file. If the file was fetched via ftp, be sure to specify "binary" for file transfer mode. "ascii" mode will mess up a binary file.

-- Rod Hills
There be dragons...
Sajid_1
Honored Contributor

Re: guzip, tar e broken pipe

Try splitting the command and do separately:
# gunzip XXXX.tgz
now you will get the .tar file, then:
# tar -xvf XXXX.tar
learn unix ..
Deepak Extross
Honored Contributor

Re: guzip, tar e broken pipe

<>

There's no "gnzip" command on HP-UX.
It should be "gunzip"
T G Manikandan
Honored Contributor

Re: guzip, tar e broken pipe

//*
gzip complains with Broken pipe
If you use the commands described above to extract a tar.gz file, gzip sometimes emits a Broken pipe error message. This can safely be ignored if tar extracted all files without any other error message.
The reason for this error message is that tar stops reading at the logical end of the tar file (a block of zeroes) which is not always the same as its physical end. gzip then is no longer able to write the rest of the tar file into the pipe which has been closed.

This problem occurs only with some shells, mainly bash. These shells report the SIGPIPE signal to the user, but most others (such as tcsh) silently ignore the pipe error.

You can easily reproduce the same error message with programs other than gzip and tar, for example:

cat /dev/zero | dd bs=1 count=1


*//
Luca_11
Occasional Contributor

Re: guzip, tar e broken pipe

Thank you all,
I think the problem was that gunzip 1.2.4 don't support file size > 2 GB.

Bye
Luca