[clue-tech] Script for Unzipping?
Jeff Schroeder
jeff at neobox.net
Sat Apr 30 10:38:20 MDT 2005
Joseph asked:
> Does any such beast exist (or can exist)? I've tried just using
>
> $unzip *.zip
>
> but that always returns:
>
> Archive: aajaxsurrealfreak.zip
> caution: filename not matched: aarcover.zip
That's because the shell is expanding "*.zip" before running the unzip
command. Thus, the command actually being executed is something like
$ unzip file1.zip file2.zip file3.zip
... and Unzip interprets that as "unzip file1.zip and find file2.zip
inside the archive".
You want to use something like find:
$ find -name "*.zip" -exec unzip {} \;
That'll do a recursive unzip. To limit to the current directory, use
$ find -name "*.zip" -maxdepth 1 -exec unzip {} \;
HTH,
Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://cluedenver.org/pipermail/clue-tech/attachments/20050430/5d65e00b/attachment.bin
More information about the clue-tech
mailing list