LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   tar command.. (https://www.linuxquestions.org/questions/linux-software-2/tar-command-130478/)

johnyy 12-31-2003 09:05 PM

tar command..
 
hello, i done some research but still can't not find my anwer.. hope your guys could help.. the question it's that i rpm -ivh the redhat source from cd1 cd2 cd3, i go to /usr/src/redhat/SOURCES, ther's a lot tar and gunzip files... i was enable to gunzip *.tar.gz and binzip2 *.tar.bz2 at once, but i wasn't enable to tar xvf *.tar file... or tar zxvf *.tar.gz at once... it would give me error say

tar: rdate-1.3.tar.gz: Not found in archive
tar: rdist-v1.tar.gz Not found in archive

but i was enable to do

tar zxvf rdist-v1.tar.gz(work fine without problem)


thanks

Mega Man X 12-31-2003 09:27 PM

I'm a bit lost. But lemme see if I understand. To uncompress a file named rdist-v1.tar.gz, you could:

1- tar xvzf rdist-v1.tar.gz

as you did or...

2 - gunzip rdist-v1.tar.gz

That would make a bigger file named rdist-v1.tar. Note that now it's tar, not gunzip, so type

tar xvf rdist-v1.tar

For bunzip2 (files ended with bz2) the command is:

bunzip2 rdist-v1.tar.bz2

I really did not understand the question, but this is how I uncompress stuff :D

Good luck and Happy New Year!

johnyy 12-31-2003 09:39 PM

let me clear that a little bit, after i rpm -ivh source from redhat iso, all the source go in to the folder /usr/src/redhat/SOURCES.. there's a lot those tar.gz files... my question it's how could i untar all those files at once with the command tar ?? (like tar zxvf *.tar.gz, but it didn't work)

thanks

Mega Man X 12-31-2003 10:23 PM

I see :). I've never done it, sorry. But in DOS, we did *.* for everything, so tar xvzf *.* (?). This is the wildest guess I can try :). It might work differently with tars though...

well, good luck! :) Please let me know if you find a way doing it, I'd love to know ;) thanks

homey 12-31-2003 10:54 PM

Maybe this little script which I saw here recently would work for you.....

______________________________
#!/bin/bash
for i in *.gz; do
tar -xzvf $i
done


All times are GMT -5. The time now is 03:42 PM.