View previous topic :: View next topic |
Author |
Message |
dufnutz Apprentice
Joined: 01 May 2002 Posts: 209
|
Posted: Tue Oct 01, 2002 5:04 pm Post subject: how do i untar many files? |
|
|
i downloaded all 181 gkrellm skins given by the gkrellm site. I want to un tar all of them so i can flip through them to find one i like.
i untared the first file ok and it gave me 181 new tar files for each theme. i figured i could do this
tar -xvf *.tar
but when i do that i get this err
Code: |
tar: cyrus.tar: Not found in archive
tar: cyrus2.tar: Not found in archive
tar: dark-smokey.tar: Not found in archive
tar: dirtchamber.gkrellm.tar: Not found in archive
tar: eFVWM.tar: Not found in archive
tar: eLap.tar: Not found in archive
tar: eMac.tar: Not found in archive
tar: eSlate_gkrellm.tar: Not found in archive
tar: get-E-blue.gkrellm.tar: Not found in archive
tar: getE.gkrellm.tar: Not found in archive
tar: getE2.gkrellm.tar: Not found in archive
tar: gklcars.tar: Not found in archive
tar: gkrellm-nlog.tar: Not found in archive
tar: gkrellm-qn-x11.tar: Not found in archive
tar: glass.gkrellm.tar: Not found in archive
tar: greenHeart_gkrellm.tar: Not found in archive
tar: greyNeOn.gkrellm.tar: Not found in archive
tar: indiglow_blue-gkrellm.tar: Not found in archive
tar: invisible.tar: Not found in archive
tar: krooks.tar: Not found in archive
tar: m0kH4.tar: Not found in archive
tar: master.tar: Not found in archive
tar: matrix_feeling-0.1.tar: Not found in archive
tar: minE-Gkrellm.tar: Not found in archive
tar: minEguE_lite.tar: Not found in archive
tar: minegue-beta.tar: Not found in archive
tar: myway.tar: Not found in archive
tar: nIx_gkrellm.tar: Not found in archive
tar: null-gkrellm.tar: Not found in archive
tar: plain-black.tar: Not found in archive
tar: platinum.tar: Not found in archive
tar: propaganda2a.tar: Not found in archive
tar: propaganda2b.tar: Not found in archive
tar: r9x_gkrellm.tar: Not found in archive
tar: red.tar: Not found in archive
tar: sandymidnight.tar: Not found in archive
tar: spiff.tar: Not found in archive
tar: spiffE.tar: Not found in archive
tar: stirling.gkrellm.tar: Not found in archive
tar: sunset.gkrellm.tar: Not found in archive
tar: thinsys.tar: Not found in archive
tar: tiny.gkrellm.tar: Not found in archive
tar: trublu.tar: Not found in archive
tar: x17.tar: Not found in archive
tar: Error exit delayed from previous error
|
and so on for all the theme files. is there a quick way to do this or do i need to untar all them one by one |
|
Back to top |
|
|
delta407 Bodhisattva
Joined: 23 Apr 2002 Posts: 2876 Location: Chicago, IL
|
Posted: Tue Oct 01, 2002 5:07 pm Post subject: |
|
|
Use a loop in your local friendly Bourne shell:
Code: | $ for file in `ls *.tar`; do tar xvf $file; done |
_________________ I don't believe in witty sigs. |
|
Back to top |
|
|
px Guru
Joined: 26 Sep 2002 Posts: 497 Location: Metz, France
|
Posted: Tue Oct 01, 2002 5:30 pm Post subject: |
|
|
place yourself into the dir you want to untar and type:
for somevar in /dire_where_your_tar_are/*.tar; do tar -xvf $somevar; done;
You can also unzip multi file by replacing tar -xvf by unzip -o (to overwrite duplicate file) |
|
Back to top |
|
|
TuxFriend Apprentice
Joined: 14 Aug 2002 Posts: 151
|
Posted: Tue Oct 01, 2002 5:34 pm Post subject: |
|
|
delta407 wrote: | Use a loop in your local friendly Bourne shell:
Code: | $ for file in `ls *.tar`; do tar xvf $file; done |
|
If the name of the file has space(s) in it then $file is not complete. Only the part between space(s) is in $file and therefore it's not working. Any idea how to solve this?
TuxFriend |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Tue Oct 01, 2002 6:44 pm Post subject: |
|
|
How about this: Code: | $ find ./ -name '*.tar' -print0 | xargs -0 tar xvf |
_________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
px Guru
Joined: 26 Sep 2002 Posts: 497 Location: Metz, France
|
Posted: Tue Oct 01, 2002 6:52 pm Post subject: |
|
|
I think this should work:
for file in *.tar; do tar -xvf "$file"; done; |
|
Back to top |
|
|
dufnutz Apprentice
Joined: 01 May 2002 Posts: 209
|
Posted: Tue Oct 01, 2002 7:42 pm Post subject: |
|
|
worked thanks guys |
|
Back to top |
|
|
|