1833310 Members
2963 Online
110051 Solutions
New Discussion

Re: Unzipping the file

 
SOLVED
Go to solution
Girish_17
Regular Advisor

Unzipping the file

Hi all,
This could be an silly question but in a hurry.
I would like to know the way to unzip the file with .tgz extension.
Gunzip doesn't work ... what do i use for it??
Thanks and regards,
Girish
9 REPLIES 9
Ralph Grothe
Honored Contributor

Re: Unzipping the file

/usr/contrib/bin/gzip -dc file.tgz|tar xvf -
Madness, thy name is system administration
Eric Antunes
Honored Contributor

Re: Unzipping the file

Hi Girish,

Use gzip (See man for more details):

#gzip -d

Best Regards,

Eric Antunes
Each and every day is a good day to learn.
Victor BERRIDGE
Honored Contributor

Re: Unzipping the file

Hi,
Like above or with gzcat | tar -xvf -


All the best
Victor
Girish_17
Regular Advisor

Re: Unzipping the file

Thanks a lot RAlph, Eric and VIctor for your prompt responses but this is what is get :

# ll
total 64432
-rw-r----- 1 root sys 32987886 Dec 21 14:47 hpux_800_11.23_122102
48.tgz
# gzip -dc hpux_800_11.23_12210248.tgz | tar xvf -
x patch_manifest, 112 bytes, 1 tape blocks
x README_hp-ux, 1780 bytes, 4 tape blocks
x create_depot_hp-ux_11, 5768 bytes, 12 tape blocks
x BUNDLE11i_B.11.23.0409.3.depot, 532490240 bytes, 1040020 tape blocks

gzip: hpux_800_11.23_12210248.tgz: unexpected end of file
Tar: error! blocksize changed
#


What do you suspect...!
Thanks and regards,
Girish
H.Merijn Brand (procura
Honored Contributor
Solution

Re: Unzipping the file

Use GNU tar, if you can get it, it has automatic correction for that type of error.

GNU tar 1.15 was released yesterday, and it has automatic compression detection! Yeahh!!! No more need for -z -Z or -j

The error/warning can probably be ignored, you can check this with

# tar tf BUNDLE11i_B.11.23.0409.3.depot

If that does not yield any error, the extract was fine. Otherwise, you have to re-fetch hpux_800_11.23_12210248.tgz because it is probably an unfinished download

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Ranjith_5
Honored Contributor

Re: Unzipping the file

Hi Girish,

The .tgz file you tried to down load was not completed it seems. Use a download manager viz.Download Accelerator Plus for download which gives a better continuity in download. You can also resume downloads using such utilities incase u loose the connectivity during ur download.

Try downloading the file again.

Regards,
Syam
Ralph Grothe
Honored Contributor

Re: Unzipping the file

Merijn,

wow really good news the auto compression detection. :-)
I always used to forget the -j switch for bzip2 packed archives with GNU tar.
Madness, thy name is system administration
H.Merijn Brand (procura
Honored Contributor

Re: Unzipping the file

New GNU cpio-2.6 just uploaded to my site. Give it a few hours to spread to the mirrors. GNU tar-1.15 is about to follow pretty soon

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Girish_17
Regular Advisor

Re: Unzipping the file

Thanks to All.
That was simply great and helpful.