Untar a file on Solaris reports - tar: directory checksum error

The .tar.gz is the hint for what you are doing wrong - you are not uncompressing it first. If your version of tar supports it, you can use the -z flag to specify it is compressed with gzip:

tar -xzvf 4.56_release.tar.gz

Otherwise, you'll have to gunzip it manually:

gunzip -c 4.56_release.tar.gz | tar xvf -

(The reason it works on Linux is probably that is has a newer/different version which automagically detects the compression)


If you have a '.tar.bz2' type of archive file and neither of the above options worked ('-z' is not supported for your version of 'tar'), you can use:

bzip2 -d your_file.tar.bz2

to decompress, then use tar:

tar -xvf your_file.tar

Taken from here: https://www.linuxquestions.org/questions/solaris-opensolaris-20/how-to-unpack-a-tar-bz2-file-654772/

Tags:

Linux

Tar