Problem with the tar -xvf command

Posted on 2002-03-21
Last Modified: 2012-06-21

I am trying to run the tar command to unzip a version of the apache server onto SUN Solaris 8. However I am keep recieving and error.

Command used

tar -xvf apacheserverzipname.tar.Z


tar: directory checksum error

This error keeps ocurring. I have tried removing and re ftp-ing the file, I have used chmod 755.

I would like your advice of where I may be going wrong and what I should  do next.

Thanks in advance
Question by:hawkers
  • 2
  • 2
LVL 11

Accepted Solution

griessh earned 100 total points
ID: 6885427
This file is tared AND zipped.

Do a '(g)unzip apacheserverzipname.tar.Z' first, you will get a apacheserverzipname.tar file that can be untared ...

LVL 40

Expert Comment

ID: 6885432
The file you've downloaded is compressed and needs to be decompressed before tar can read it. You can do one of two things. Either decompress and untar on the fly with:

zcat apacheserverzipname.tar.Z | tar xvof -

or decpmpress the file and then untar the result with:

uncompress apacheserverzipname.tar.Z
tar xvof apacheserverzipname.tar

FYI: the 'o' argument to tar will change the file ownership of the extracted files to be that of the user that unpacks the archive. Otherwise the files will retain the ownership of who ever created the archive.
LVL 11

Expert Comment

ID: 6885443
The zip is a compression usually done to use storage better and make the download faster. The tar is the raw packaging of the files and directories they do do create ONE file from a set of files.

There are different zip programs available.
'zip/unzip' is the native version that comes with most UNIXs. It is not very eficient, that why many people use the GNU version 'gzip/gunzip'.


Author Comment

ID: 6885467
Thanks guys

Author Comment

ID: 6885472
Thanks guys

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now