1848854 Members
8586 Online
104038 Solutions
New Discussion

Re: tar

 
SOLVED
Go to solution
Jade Bulante
Frequent Advisor

tar

I have file that I need to uncompress. The file is PGPcmdln_6.5.8_HPUX_FW.tar

I tried tar -xvf and did does not work. Need help.
10 REPLIES 10
S.K. Chan
Honored Contributor
Solution

Re: tar

If the tar file is compressed, it usually has .Z extension or .gz extension. Try these ..

# gunzip PGPcmdln_6.5.8_HPUX_FW.tar
or
# uncompress PGPcmdln_6.5.8_HPUX_FW.tar

then only you un-tar it ..

# tar xvf PGPcmdln_6.5.8_HPUX_FW.tar

You might want to index-list it first just to see what's in it ..

# tar tvf PGPcmdln_6.5.8_HPUX_FW.tar

A. Clay Stephenson
Acclaimed Contributor

Re: tar

The other possibility is that you downloaded this file in ASCII mode and you should have used BINARY. You really should always use
tar -vtf before tar -xvf so that you can simply list the contents without doing any harm. Who knows, your harmless little tarball might just overwrite /stand/vmunix.

If it ain't broke, I can fix that.
Craig Rants
Honored Contributor

Re: tar

Jade,

determine what type of file it is

file PGPcmdln_6.5.8_HPUX_FW.tar

If it is a gzip file try this

gzip -d < PGPcmdln_6.5.8_HPUX_FW.tar | tar xvf -

GL,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Sanjay_6
Honored Contributor

Re: tar

Hi Jade,

What was the format you tried,

tar tvf PGPcmdln_6.5.8_HPUX_FW.tar

To list the contents of this archive of it is in tar format, and

tar xvf PGPcmdln_6.5.8_HPUX_FW.tar

to extract the contents from this archive.

Hope this helps.

Regds
Jade Bulante
Frequent Advisor

Re: tar

Non of the commands work at at all. I get a directory checksum error.
Sanjay_6
Honored Contributor

Re: tar

Hi Jade,

If you have downloaded this file from the net, suggest you download the file once again. Do remember to choose the binary mode of transfer. Also if you had downloaded the file to your windows workstation, ftp'ed it to your unix server, suggest you try to download the file directly to your unix server. Then try the extraction once again.

Hope this helps.

Regds
Kenny Chau
Trusted Contributor

Re: tar

Are you sure that the tar file is a zipped file? If yes, rename the tar file to a file ended with .Z,
eg. mv PGPcmdln_6.5.8_HPUX_FW.tar PGPcmdln_6.5.8_HPUX_FW.tar.Z

Then uncompress this file:
# uncompress PGPcmdln_6.5.8_HPUX_FW.tar

Then try to list the contents from the tar file:
# tar tvf PGPcmdln_6.5.8_HPUX_FW.tar

If you can list the contents, then you can extract the tar file by:
# tar xvf PGPcmdln_6.5.8_HPUX_FW.tar

Hope this helps.
Kenny.
Kenny
Sachin Patel
Honored Contributor

Re: tar

Well Jade,
If you gets checksum error that means your file is bad. Download it again and use binary mode.

If you are downloading on windows system use whatever is default and transfer that file using ftp binary mode to unix system.

For example when I download any patchs, window generate PHCO_????.txt file then I move that file to unix and rename to PHCO_????

Sachin
Is photography a hobby or another way to spend $
Frank Slootweg
Honored Contributor

Re: tar

> Non of the commands work at at all. I get a directory checksum error.

Well, Craig advised to give a file(1) command and that *can not* give a directory checksum error, so what *does* it say?

I.e. what is the output of

$ file PGPcmdln_6.5.8_HPUX_FW.tar

Also see Sachin's comments on binary mode for FTP.

Frank Slootweg
Honored Contributor

Re: tar

You gave everybody 10 points, which is very generous, probably too generous, but I am sure that we all also would like to know *what* the actual (problem and) solution was, so please post this information. Thank you.