Operating System - HP-UX
1819805 Members
2891 Online
109607 Solutions
New Discussion юеВ

how to extract a .gz file on HP-UX

 
ayanda_1
New Member

how to extract a .gz file on HP-UX

Hi , I have a file like
Managerhpux.tar.gz and I want to extract it on HP-UX , can someone help ,
Please !!

16 REPLIES 16
Michael Tully
Honored Contributor

Re: how to extract a .gz file on HP-UX

Your can 'gunzip' to uncompress the archive.

Change directory to where you archive is

# /usr/contrib/bin/gunzip ./Managerhpux.tar.gz
Anyone for a Mutiny ?
U.SivaKumar_2
Honored Contributor

Re: how to extract a .gz file on HP-UX

Hi,

#uncompress Managerhpux.tar.gz
#tar xvf Managerhpux.tar


regards,
U.SivaKumar
Innovations are made when conventions are broken
U.SivaKumar_2
Honored Contributor

Re: how to extract a .gz file on HP-UX

Hi,

#zcat Managerhpux.tar.gz | tar xvf -


regards,
U.SivaKumar
Innovations are made when conventions are broken
Michael Tully
Honored Contributor

Re: how to extract a .gz file on HP-UX

Missed something....

# /usr/contrib/bin/gunzip ./Managerhpux.tar.gz

Once the file has been un-zipped you can extract from the archive.

change directory to where you wish to extract.

# tar xvf /directoryname/Managerhpux.tar
Anyone for a Mutiny ?
Vincent Farrugia
Honored Contributor

Re: how to extract a .gz file on HP-UX

Hello,

Mr. SivaKumar, uncompress won't work, that works only for .Z files.

Vince
Tape Drives RULE!!!
Ravi_8
Honored Contributor

Re: how to extract a .gz file on HP-UX

Hi.

#gunzip Managerhpux.tar.gz
#tar xvf Managerhpux.tar

will get you the file
never give up
U.SivaKumar_2
Honored Contributor

Re: how to extract a .gz file on HP-UX

Hi,
Mr. Vincent thanks for correcting me.

regards,
U.SivaKumar
Innovations are made when conventions are broken
Bill McNAMARA_1
Honored Contributor

Re: how to extract a .gz file on HP-UX

of course if the file isn't really a gz none of the commands will work!

file file.tar.gz
to verify format.

# file /one.tar
/one.tar: tar file
# gzip /one.tar
# file /one.tar.gz
/one.tar.gz: awk program text

awk program text.. yikes..
of course that should say gz
It works for me (tm)
ayanda_1
New Member

Re: how to extract a .gz file on HP-UX

I have tried your suggestions but I have not been successful
these are the outputs , What may be the problem ?

# zcat eManager35hpux.tar.gz | tar xvf -
eManager35hpux.tar.gz.Z: No such file or directory
Tar: blocksize = 0; broken pipe?


# gunzip eManager35hpux.tar.gz

gunzip: eManager35hpux.tar.gz: invalid compressed data--format violated


# tar xvf eManager35hpux.tar.gz
directory checksum error

# uncompress eManager35hpux.tar.gz
eManager35hpux.tar.gz.Z: No such file or directory


# tar xvf eManager35hpux.tar
tar: cannot open eManager35hpux.tar

# tar xvf eManager35hpux.tar.gz
directory checksum error
U.SivaKumar_2
Honored Contributor

Re: how to extract a .gz file on HP-UX

Hi,

what is the output of this command ?
#file Managerhpux.tar.gz

regards,
U.SivaKumar
Innovations are made when conventions are broken
Darrell Allen
Honored Contributor

Re: how to extract a .gz file on HP-UX

Hi,

If eManager35hpux.tar.gz is actually a gzipped tar file, you can use "gunzip" or "gzip -d" on it then "tar xvf". To unzip the file, you need enough space in the directory where it resides for the .gz file and the unzipped file (because the system keeps the .gz file until the unzipped file is fully unzipped).

If tight on space or you just want to extract the contents of the tar file, use:
gzip -dc eManager35hpux.tar.gz | tar xvf -

I'd always use "tar tvf" before actually extracting the contents.

"file eManager35hpux.tar.gz" may not tell you what kind of file it really is. I just ran "file" against a gzipped tar file and it said "awk program text".

Where did you get eManager35hpux.tar.gz? It's possibly corrupted. It ftp'ed from a PC, did you use binary mode? You should.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Darrell Allen
Honored Contributor

Re: how to extract a .gz file on HP-UX

By the way...

Welcome to the forums! I hope you'll find them as useful as I do. You're now part of a global community willing to help each other solve our problems. I think it's the best one anywhere!

Glad you've joined us!

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
V. Nyga
Honored Contributor

Re: how to extract a .gz file on HP-UX

Hi

to use 'uncompress' the file, it has to end with .Z (xxx.Z) so you have to copy or move it for trying to 'uncompress'.
The file name suggests me that it is downloaded from internet.
Maybe the download was uncomplete. Try it again.
You also can check a file xxx.gz with winzip or alike.
If the file is incomplete winzip will tell it.

Regards Volkmar
*** Say 'Thanks' with Kudos ***
V. Nyga
Honored Contributor

Re: how to extract a .gz file on HP-UX

Hi ayanda,

no reply from you till now.
So some more informations:

zcat and uncompress (your 1. and 4. try) only works with files with extention '.Z'.
tar needs an unzipped file. Your file is zipped (or gzipped) therefor error 'directory checksum error' (3. and 6. try).
5. try doesn't work because file doesn't exists.
2. try says 'format violated':
so either the file is incomplete or the transfer was ascii instead of binary.

Regards Volkmer
*** Say 'Thanks' with Kudos ***
Vincent Farrugia
Honored Contributor

Re: how to extract a .gz file on HP-UX

Hello,

Try with Gnu Zip.

Download it from here:

http://hpux.connect.org.uk/hppd/hpux/Gnu/gzip-1.3.3/

HTH,
Vince
Tape Drives RULE!!!
Sean OB_1
Honored Contributor

Re: how to extract a .gz file on HP-UX

Ayanda,

Please give us the output of this command:

file ./Managerhpux.tar.gz

My guess is you have a corrupted file, perhaps downloaded as ascii instead of binary.