Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't untar something...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
R-Kite
n00b
n00b


Joined: 29 Jan 2004
Posts: 28

PostPosted: Sat Feb 07, 2004 12:20 am    Post subject: Can't untar something... Reply with quote

I cannot untar something... I try tar -x something.tar.gz and the shell jumps to a new line and i wait and wait and wait and nothing happens, even as root. I tried gzip -d, then it is something.tar then tried again, nothing happens :?: :?: :?:
Back to top
View user's profile Send private message
mike4148
l33t
l33t


Joined: 09 Sep 2003
Posts: 641

PostPosted: Sat Feb 07, 2004 12:24 am    Post subject: Reply with quote

In brief:
Code:
tar -xf something.tar

Basically, what you saw was tar waiting for you to, essentially, "type in" the file contents (it reads the standard input by default). Use the "-f" option to specify the file you want to untar. Read about this and many other useful options in man tar.

Probably the most common tar commandline in the world is
Code:
tar -xzvf something.tar.gz

The "z" option tells tar to use gzip to decompress the file first, and the "v" option tells tar to be verbose -- that is, it displays the name of each file as it is extracted.
Back to top
View user's profile Send private message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2593
Location: userland

PostPosted: Sat Feb 07, 2004 12:25 am    Post subject: Reply with quote

For archiv.tar.gz, type:
Code:
tar -xzf archiv.tar.gz

for archiv.tar.bz2, type:
Code:
tar -xjf archiv.tar.bz2

The -f switch is for 'input file', otherwise tar expects input via a pipe like this:
Code:
cat archiv.tar.gz | tar -xf

G'Night!
<edit>Hey, mike4148, that's MY noob, I saw him first! :wink: </edit>
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum