Computer trivia

All I know about computers

&
 

Oct 23 2008

Untar tarballs in Linux

Published by rakshit at 10:14 pm under Tips Edit This

This post is about a very common mistake while untarring in Linux. I personally have committed this mistake many times and seen people doing this.

Suppose you have a file filename.tar. The most common way to try to untar this file is

                                                “tar -zxvf filename.tar”

Some times this gives the following error.
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors

When a file has .tar extension, it means that the file is either zipped or zipped and compressed. The command we typed above is for files that are zipped and compressed. However some times files are only zipped and not compressed. In that case the above error is thrown.

So, the command to untar tarballs that are only zipped and not compressed is

                                       “tar -xvf filename.tar”

Try this and there will not be any problem.

Possibly-related Articles:                                        (auto-generated)

Comments RSS

Leave a Reply

You must be logged in to post a comment.
Not A Member? Register for Free!

Some Today.com contributors may have received a fee or a promotional product or service from a manufacturer for promotional consideration, while others receive no consideration at all. Each contributor is responsible for disclosing any such promotional consideration.