Click to See Complete Forum and Search --> : Mass UnTar -- howto?


aaron
11-07-2000, 01:33 PM
I downloaded a tar file that has all the gkrellm skins in it. I untarred that file and it contained about 40 themes that all have their own tarballs.

How do I untar the entire directory easily?

I'd like to know a command line way, but a program that can do it would also be ok.

Aaron

ph34r
11-07-2000, 01:44 PM
#!/bin/bash
for filename in `ls *.tar.gz` do
tar xzf $filename
done

My syntax may be off, and you would need to run this in the directory that has all the tarballs, but it should get you going. Check the bash programming cheat sheet nhf for the proper syntax.

tminos
11-07-2000, 01:49 PM
tar -zxvf *.tar.gz

aaron
11-07-2000, 01:53 PM
tminos,
that doesn't work. I've tried it.

slayer17
11-07-2000, 05:06 PM
I have done the same thing! those damn Gkrellm skins, why not to one gaint tar ball instead? Oh well I think the script is your best bet.

maxl stylee
11-07-2000, 06:16 PM
for i in `ls -1 | grep .tar.gz`; do tar -zxvf $i; done


that's the number "1" in there...not an "L"
i thought it was an "l" and it kept giving me errors.
make sure you're using 1.

aaron
11-08-2000, 11:34 AM
I had troubles with that first script, but got the second one to work with the little adjusting.

Thanks for the help guys!

Aaron