Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
batch unzip from command line????
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
trethacker
n00b
n00b


Joined: 07 Nov 2004
Posts: 30

PostPosted: Thu Nov 18, 2004 11:12 pm    Post subject: batch unzip from command line???? Reply with quote

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
Code:
unzip -q *.zip

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
View user's profile Send private message
slimsam1
Tux's lil' helper
Tux's lil' helper


Joined: 13 Aug 2003
Posts: 130

PostPosted: Fri Nov 19, 2004 12:31 am    Post subject: Reply with quote

Here ya go:
Code:
ls -1 *.zip | xargs -i unzip -C {} *.ttf
Back to top
View user's profile Send private message
beandog
Bodhisattva
Bodhisattva


Joined: 04 May 2003
Posts: 2072
Location: /usa/utah

PostPosted: Fri Nov 19, 2004 12:43 am    Post subject: Reply with quote

Code:
# emerge unfoo
# unfoo *.zip


gotta love unfoo.... :)
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
trethacker
n00b
n00b


Joined: 07 Nov 2004
Posts: 30

PostPosted: Wed Nov 24, 2004 8:42 am    Post subject: thnks Reply with quote

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
View user's profile Send private message
Rafje
Tux's lil' helper
Tux's lil' helper


Joined: 19 May 2004
Posts: 109
Location: .be

PostPosted: Wed Nov 24, 2004 8:59 am    Post subject: Re: thnks Reply with quote

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
View user's profile Send private message
numerodix
l33t
l33t


Joined: 18 Jul 2002
Posts: 743
Location: nl.eu

PostPosted: Wed Nov 24, 2004 3:52 pm    Post subject: Reply with quote

The correct syntax for "unzip *.zip" is:
Code:
unzip '*.zip'

_________________
undvd - ripping dvds should be as simple as unzip
Back to top
View user's profile Send private message
rhill
Retired Dev
Retired Dev


Joined: 22 Oct 2004
Posts: 1629
Location: sk.ca

PostPosted: Sun Dec 26, 2004 8:47 am    Post subject: Reply with quote

numerodix wrote:
The correct syntax for "unzip *.zip" is:
Code:
unzip '*.zip'


aw yeah, i love these forums. :D
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