Hi I am trying to untar a compressed file on a Solaris server. I run the command
tar xvf 4.56_release.tar.gz
But this reports the following error
tar: directory checksum error
Initially I thought it was a bad download so I re-downloaded the file (actually a different version) and it reports the same error. Un-compressing and un-tar'ing it on Linux on a Linux server works fine.
Any ideas what I am doing wrong.
Definition of Linux Untar. Untar is defined as a command which enables users to extract files that are compressed with tar, tar. gz, tar. bz2 formats of compression. This command is used for 2 specific utilities in file operations.
$ tar xvzf file.tar.gz. 5. Creating compressed tar archive file in Linux using option -j : This command compresses and creates archive file less than the size of the gzip. Both compress and decompress takes more time then gzip.
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With