-   Linux - Newbie (
-   -   tar error - 'Child returned status 1' (

fabio_listas 07-21-2004 08:49 PM

tar error - 'Child returned status 1'

I am trying to unzip an .tar.gz file, so, take a look at my steps

root@lisa:~# gzip -d xxxxxx.x.x.tar.gz
root@lisa:~# tar -zxvf xxxxxx.x.x.tar

them, I had an error msg (is this an error?)

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors

help! :)

Dark_Helmet 07-21-2004 09:13 PM

You used "tar -zxvf" for the second command. the 'z' option tells tar to use gzip to uncompress the file. Since you already uncompressed it in the first command, gzip doesn't know what to do with it, and it consequently croaks. Tar stops because gzip encountered a problem. So, with the file you have now, you would extract it with:
tar -xvf xxxxxx.x.x.tar

I would go back and re-gzip the tar file though (to save space):
gzip xxxxxx.x.x.tar
tar -zxvf xxxxxx.x.x.tar.gz

IBall 07-21-2004 09:13 PM

The first step uncompresses the tar ball.
In the second step, tar is expecting a compressed tar ball (.tar.gz).

You can either do:

tar -xvf fileName.tar
for an uncompressed tar ball

tar -xzvf fileName.tar.gz
for a compressed tar ball, as the z switch uncompresses the tar ball using gzip.

I hope this helps

fabio_listas 07-21-2004 10:12 PM

well, the idea of merge two kinds of uncompress a file is a little bit confuse to me, but I understood the answers!
I will try it! thanks!

xinelo 09-08-2004 06:11 PM

Thanks for your replies to fabio_listas' question, they helped me too ;) I will try them and see if they work for me.

However my question relates to a related yet different thing.

Dark Helmet said:

tar -zxvf file.tar.gz

and IBall said

tar -xzvf file.tar.gz

I would like to know whether the order of instructions is important or whether the command has a differnet meaning depending on the combination of the letters.

Thanks a lot, xinelo

Dark_Helmet 09-08-2004 07:46 PM

Nope. The order of options on the command line doesn't matter. Don't think of them as "instructions" per se, but as switches. You're telling the program how to operate; not giving it an explicit sequence of steps to take.

The examples above are equivalent to:

tar -z -x -v -f filename.tar
The only thing that you must do is specify the filename immediately after the "f" option; that is a requirement of the option itself.

xinelo 09-12-2004 09:46 AM

ok. thanks a lot! :)

flymz 01-16-2011 12:47 AM

By reading it,my problem is also solved! Thanks.:newbie:

ashish_neekhra 01-16-2011 04:16 AM

See this.

Hope it'll help you.

All times are GMT -5. The time now is 09:41 AM.