8
1
I'm using a Sun Sparc System, aka Solaris. I have a .tar.gz file, and I can't figure out how to untar it. The command I usually use doesn't work:
tar -xzvf file.tar.gz
Anybody know how to do this? I can't be an answer anywhere!
8
1
I'm using a Sun Sparc System, aka Solaris. I have a .tar.gz file, and I can't figure out how to untar it. The command I usually use doesn't work:
tar -xzvf file.tar.gz
Anybody know how to do this? I can't be an answer anywhere!
14
You have to gunzip
then untar
on Solaris. It should come with GNU tar:
gtar xzvf somefile.tar.gz
if that doesn't work:
gunzip -c somefile.tar.gz |tar xvf -
Doesn't the z
option enable gzip
anyway? – user1686 – 2009-09-29T13:20:36.910
1it should gunzip and untar in one. – John T – 2009-09-29T13:47:13.193
It does with GNU tar, but the tar that comes with Solaris is not GNU tar and doesn't support that option. – wfaulk – 2009-09-29T18:38:22.290
GNU tar comes with the freeware packages to install on Solaris – John T – 2009-09-29T20:42:12.757
1You kids - you've been spoilt with those new-fangled GNU commands! (I tend to do "gzip -dc filename | tar tf -" as an automatic thing, whatever platform, even when it does have a gnu-tar available. After all, even if your tar understands gzip, it might not understand bzip2, 7za, etc...) – jrg – 2009-10-07T16:51:01.473
Solaris 11 & later tar support the z
option for gzip, along with Z
for compress and j
for bzip2, but Solaris 10 and older do not support the compression options in the native tar, only in GNU tar. – alanc – 2012-12-04T07:11:32.040
0
For .bzip2 files I used the following procedure:
bunzip2 filename.tar.bz2
This will remove the bz2 extension.
Then
tar -xvf filename.tar
-v
only for verbose mode.
The above comment "Solaris tar is sometimes broken" is wrong. The original Solaris tar only implements the original standardized tar file format. The "breakage" comes from GNU tar (and others) creating extensions to the tar file format without standardization. Saying "Solaris tar is broken" because it can't handle non-tar "tar" files is like saying
– Andrew Henle – 2018-01-30T17:53:57.183vi
is broken because it can't handle MS Word files. AIX tar can have the same issues with GNU "tar" archives: http://www-01.ibm.com/support/docview.wss?uid=swg219693571
Btw you should take note that "Solaris tar is sometimes broken (i.e. can't deal with long directory names etc.)". For more details see http://bytes.com/topic/python/answers/101777-python-installation-error-solaris-9-sparc#post364804 and http://www.python.org/download/releases/2.4.2/bugs/
– Cristian Ciupitu – 2009-09-29T15:50:33.253