View previous topic :: View next topic |
Author |
Message |
trethacker n00b
Joined: 07 Nov 2004 Posts: 30
|
Posted: Thu Nov 18, 2004 11:12 pm Post subject: batch unzip from command line???? |
|
|
I have searched all over the place to find out how I can unzip several files at once from the command line and all I can find are the normal unzip options, but none seem to tell how to do multiple files...
I have a bunch of font files in .zip format... instead of extracting each one seperately, I would like to unzip all of them at once, to the same folder they reside in now...
also, the .zip files usually contain more than just .ttf files, and I would like to ONLY extract the .ttf files and none of the other garbage... if that is possible...
I have tried several different unzip commands, options, modifiers, parameters, etc... the one I figure would work fine would be
for a general quiet unzip command.... even if this is all I can do, I would be happy to remove all the garbage files myself... but this command returns the error
Code: | caution: filename not matched: {filename} |
for every .zip file in the directory...
can someone PLEASE give me the command line for this job?
thanks in advance...
(PS - if it matters, 2004.2, stage3, 2.6.9-r4, kde3.3.1 {running command line from terminal in kde} ) _________________ .:tre:. |
|
Back to top |
|
|
slimsam1 Tux's lil' helper
Joined: 13 Aug 2003 Posts: 130
|
Posted: Fri Nov 19, 2004 12:31 am Post subject: |
|
|
Here ya go:
Code: | ls -1 *.zip | xargs -i unzip -C {} *.ttf |
|
|
Back to top |
|
|
beandog Bodhisattva
Joined: 04 May 2003 Posts: 2072 Location: /usa/utah
|
Posted: Fri Nov 19, 2004 12:43 am Post subject: |
|
|
Code: | # emerge unfoo
# unfoo *.zip |
gotta love unfoo.... _________________ If it ain't broke, tweak it. dvds | blurays | blog | wiki |
|
Back to top |
|
|
trethacker n00b
Joined: 07 Nov 2004 Posts: 30
|
Posted: Wed Nov 24, 2004 8:42 am Post subject: thnks |
|
|
sorry it took so long to get back... thank you for the help... unfoo did it for me... although it took forever to get all the non-ttf files out of the way...
_________________ .:tre:. |
|
Back to top |
|
|
Rafje Tux's lil' helper
Joined: 19 May 2004 Posts: 109 Location: .be
|
Posted: Wed Nov 24, 2004 8:59 am Post subject: Re: thnks |
|
|
trethacker wrote: | it took forever to get all the non-ttf files out of the way... |
For your future reference: Code: | ls | grep -v -i '\.ttf$'| xargs rm |
Cheers |
|
Back to top |
|
|
numerodix l33t
Joined: 18 Jul 2002 Posts: 743 Location: nl.eu
|
Posted: Wed Nov 24, 2004 3:52 pm Post subject: |
|
|
The correct syntax for "unzip *.zip" is:
_________________ undvd - ripping dvds should be as simple as unzip |
|
Back to top |
|
|
rhill Retired Dev
Joined: 22 Oct 2004 Posts: 1629 Location: sk.ca
|
Posted: Sun Dec 26, 2004 8:47 am Post subject: |
|
|
numerodix wrote: | The correct syntax for "unzip *.zip" is:
|
aw yeah, i love these forums. |
|
Back to top |
|
|
|