[clue-tech] Script for Unzipping?
Kiawud
kiawud at gmail.com
Sat Apr 30 10:36:25 MDT 2005
On 4/30/05, Joseph A. Nagy, Jr. <jnagyjr at joseph-a-nagy-jr.us> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I really am sorry for the x-posting, but I am hoping for an answer asap.
> Follow-up set to me, I'll post the solution I use to both lists in an
> x-posted reply.
>
> I'm looking for a script that will take "*.zip" and unzip all files matching
> that expression in the current (or specified) directory (as in the case of
> ~/*/.zip which would go into all directories one level below /home/jnagyjr
> and unzip all archives matching *.zip).
>
> 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
> ....
Have you tried something like:
find ./ -name \*zip -exec unzip {} \; (to recursively unzip all files
in a hierarchy)
or
for i in `ls *zip`; do unzip "$i"; done (to just unzip what's in the
current directory)
-Hani
More information about the clue-tech
mailing list