1819804 Members
3209 Online
109607 Solutions
New Discussion юеВ

can not unzip a .gz file

 
SOLVED
Go to solution
tom quach_1
Super Advisor

can not unzip a .gz file

Dear all
just down load a tool from to the Porting And Archive Centre for HP-UX in the United Kingdom
the file has a format
lsof-4.75-hppa-11.11.depot.gz
i was using
$gunzip lsof-4.75-hppa-11.11.depot.gz
gunzip: lsof-4.74-sd-11.11.depot.gz: not in gzip format
and
#gzip -d lsof-4.74-sd-11.11.depot.gz
gzip: lsof-4.74-sd-11.11.depot.gz: not in gzip format

root]:/tmp/tmp
#file lsof-4.74-sd-11.11.depot.gz
lsof-4.74-sd-11.11.depot.gz: tar file
it is a tar file.
i can untar the file but do not know how to install from there.
my question is: is this an in-corrected file format.
or if i was using a wrong command.
Please help.

Regards,
Tom
8 REPLIES 8
H.Merijn Brand (procura
Honored Contributor
Solution

Re: can not unzip a .gz file

# mv lsof-4.74-sd-11.11.depot.gz lsof-4.74-sd-11.11.depot
# swinstall -s `pwd`/ lsof-4.74-sd-11.11.depot lsof

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Steven E. Protter
Exalted Contributor

Re: can not unzip a .gz file

Shalom Tom,

Most likely your download is not complete.

You are probably better off doing the download again.

The correct command sequence is:

gunzip filename.gz
tar xvf filename.tar

If you are doing this and have a halfway recent copy of gunzip and tar you should be okay.

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
A. Clay Stephenson
Acclaimed Contributor

Re: can not unzip a .gz file

I suspect what is wrong is that you did not download the file in binary mode or if you transferred the file from a PC to your UNIX box you missed the binary mode at that step.
If it ain't broke, I can fix that.
Ivan Ferreira
Honored Contributor

Re: can not unzip a .gz file

It won't be the first time that a file was tared but not gzipped, and the packager still adds the .gz extension.

To verify the integrity, use checksums, if you could untar the file, the file should be ok, otherwise, you will have "does not look like a tar file".
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
tom quach_1
Super Advisor

Re: can not unzip a .gz file

Hello dear,

Thanks very much for your help.
i did download to windows and using ftp with transfer mode set to bin but it still did not work.
with the Procure's method, it works
Procure, would you please explain why it works that way( just rename the file).
Regards,

Tom
H.Merijn Brand (procura
Honored Contributor

Re: can not unzip a .gz file

Several possibilities

1. It was not gzipped in the first place. (Author misnamed it)
2. Someone or something else already ungzipped it, but did not rename the file (blame the browser)
3. Someone misnamed it on purpose to confuse you
4. Use your imagination :)

As you already stated in your initial post, use the 'file' command to tell you what file type a file realy is. The extension is only an indicator. Some examples

# echo "Hello world!" > banner.ico
# echo "#!rm -rf /" > virus.exe

See? Do not trust an extension

The only knowledge you missed was that a depot is just a tar file with some control files in it. That's why a depot shows up as tar when using 'file'

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
tom quach_1
Super Advisor

Re: can not unzip a .gz file

Thank you very much.

Regards,
Tom
tom quach_1
Super Advisor

Re: can not unzip a .gz file

Close thread