1837655 Members
3086 Online
110117 Solutions
New Discussion

.tar.gz

 

.tar.gz

I have a file with an extion ".tar.gz" how can I unzip this fiel. I try " gunzip filename it is not working.

Raghu
no personal quote
11 REPLIES 11
Patrick Wallek
Honored Contributor

Re: .tar.gz

gunzip on the file should work. What error did it give you when you did the gunzip?

It is possible it is not a gzip file after all.

What happens if you just do a

# tar -tvf filename.tar.gz

Ramkumar Devanathan
Honored Contributor

Re: .tar.gz

try this -

$ file filename.tar.gz

paste out the output of the above command if interesting.

- ramd.
HPE Software Rocks!
James R. Ferguson
Acclaimed Contributor

Re: .tar.gz

Hi:

# gzip -d filename.tar.gz

Regards!

...JRF...
H.Merijn Brand (procura
Honored Contributor

Re: .tar.gz

get GNU tar *and* gzip from http://www.cmve.net/~merijn or https://www.beepz.com/personal/merijn and then try

# gtar -tzvf blah.tar.gz

(presuming you installed GNU tar as gtar) GNU tar has built-in gzip support.

# file blah.tar.gz

if it says plain tar, you

# mv blah.tar.gz blah.tar
# gtar -tvf blah.tar

The worst someone can do to you is use a wrong extension. e.g. if he/she used bzip2 instead of gzip, you will *need* bzip2

# bzip2 -d < blah.tar.gz | tar tvf -

If you get stuck, post a hex dump of the first 32 bytes of the compressed archive, and we'll check it against our /etc/magic file

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Ramkumar Devanathan
Honored Contributor

Re: .tar.gz

Hey Procura,

you could even use tar tIvf to unzip bzipped tar archives with gnu tar...

- ramd.
HPE Software Rocks!
Ramkumar Devanathan
Honored Contributor

Re: .tar.gz

tar tIvf to list contents and tar xIvf to bunzip it - sorry typo...

- ramd.
HPE Software Rocks!
Paddy_1
Valued Contributor

Re: .tar.gz

this should work

gzip -dc | tar xvf -

btw check /usr/contrib/bin for gunzip if you are comfortable with it
The sufficiency of my merit is to know that my merit is NOT sufficient
H.Merijn Brand (procura
Honored Contributor

Re: .tar.gz

Ramkumar, I never checked, but is 'I' using an internal decoding, or does it internally call an external available bzip2?

The gzip decoding is completely native if built with zlib.

Anyway, GNU tar rulez, and bzip beats the hell out of gzip.

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Ramkumar Devanathan
Honored Contributor

Re: .tar.gz

Procura,

just checked the man pages and they say the 'I' option is getting obsoleted - so better to use 'j' option (tar -xjvf) for bzip2 decompression...

... (although the) -j option uses the bzip2 utility.

Thanks for bringing that to my notice.

- ramd.
HPE Software Rocks!
Bill Hassell
Honored Contributor

Re: .tar.gz

If gunzip complains that it is not a gzip file format, perhaps it was transferred in ASCII mode using ftp. If so, the file is completely corrupted and must be downloaded again using BINARY mode.


Bill Hassell, sysadmin

Re: .tar.gz

There was nothing wrong with the file. The problem was, I download the file from the site to my pc and ftp to my HP server, but when I ftp it I did not us the " bin" that was the reason, I delet the file and ftp the file with binary and gunzip worked. It was my stupdity. that is all
no personal quote