Operating System - HP-UX
1820390 Members
3886 Online
109623 Solutions
New Discussion юеВ

Tar: blocksize = 0; broken pipe? problem

 
SOLVED
Go to solution
Mousa55
Super Advisor

Tar: blocksize = 0; broken pipe? problem

Hi
i am installed more patch with .tgz extention (34MB).
but when i try to install this patch by this command
tar -xvf /tmp/patch/hpux__11.00_08130943.tgz
i see this problem
Tar: blocksize = 0; broken pipe?
and after this command i see
gzcat /tmp/patch/hpux__11.00_08130943.tgz | tar -xf -
unexpected end of file
Tar: blocksize = 0; broken pipe?
how to solve this problem????
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: Tar: blocksize = 0; broken pipe? problem

Shalom,

Its not a tar file.

Its a tgz file

http://www.computerhope.com/issues/ch000506.htm

http://en.wikibooks.org/wiki/Guide_to_Unix/Commands/File_Compression

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven Schweda
Honored Contributor
Solution

Re: Tar: blocksize = 0; broken pipe? problem

> tar -xvf /tmp/patch/hpux__11.00_08130943.tgz

Yes, an old UNIX "tar" program can't do the
required "gzip -dc"="gzcat". (And I believe
that even GNU "tar" needs a "-z" option to
tell _it_ to do it.)

> gzcat /tmp/patch/hpux__11.00_08130943.tgz | tar -xf -

Should work better.

> unexpected end of file

Do you have the whole xxx.tgz file, or was
its download aborted before you got it all?

ls -l /tmp/patch/hpux__11.00_08130943.tgz

What does it say if you change "tar -xf -" to
"tar -tvf -"? (Are you getting nothing, or
only some of the files in the payload?)
TTr
Honored Contributor

Re: Tar: blocksize = 0; broken pipe? problem

tgz is a compressed tar file. The gzcat command should have worked. You probably have a bad file. Either partial download or if you ftp-ed the file you did not use binary format. Try the following.

cd /tmp/patch
(make a copy of the file or use "mv" instaed of "cp")
cp hpux__11.00_08130943.tgz hpux__11.00_08130943.tar.gz

(uncompress the gz file, should give you the tar file)
gunzip hpux__11.00_08130943.tar.gz

(Extract the tar file)
tar -tvf hpux__11.00_08130943.tar

You will see whether the error is in the compressed file or in the tar file.
Dennis Handly
Acclaimed Contributor

Re: Tar: blocksize = 0; broken pipe? problem

You can also use file(1) to see what type of file it is. Obviously it won't tell you that the gzip or tar file as been corrupted by truncation. TTr's suggestion about breaking it into steps may tell you where the corruption started.
After you downloaded your patch bundle, you should check the checksum values.
Deepak Kr
Respected Contributor

Re: Tar: blocksize = 0; broken pipe? problem

Also:

Try running cksum on this file and verify if you get same value that you see on the website you downloaded this file


so run following

file /tmp/patch/hpux__11.00_08130943.tgz
cksum /tmp/patch/hpux__11.00_08130943.tgz

see the results if not same then download the file again!!
"There is always some scope for improvement"
Steven Schweda
Honored Contributor

Re: Tar: blocksize = 0; broken pipe? problem

Or just try downloading the file again, and
see if you get the same stuff.

Please say that you're not using MSIE on some
Windows system to do the download.
Too-clever browsers often "help" the user by
decompressing compressed files without
adjusting the file name accordingly.

> unexpected end of file

> You will see whether the error is in the
> compressed file or in the tar file.

Someone thinks that the file ends too soon.
I doubt that gzip/gzcat is truncating a
complete ".tgz" file, and I doubt that "tar"
is giving up before it sees the end of the
expanded data. I claim that it doesn't
really matter who's emitting the complaint.
The ".tgz" file is almost certainly corrupt,
although without a better description of its
history, it'll be hard to assign the blame.
Whether it started out corrupt, or got that
way in transit, it's sure bad now.
Mousa55
Super Advisor

Re: Tar: blocksize = 0; broken pipe? problem

thanks for all