On Wed, Jun 17, 2009 at 2:24 PM, Anu-Linux <[email protected]> wrote:
> Hi,
>
> Did you try unzip command?
>
> $ unzip -l zipfile.zip
>
> will show you the contents of the archive without extracting it.
>
> $ unzip -l zipfile.zip | grep JPG
>
> will show you all the JPG files inside that archive.
Thanks for your reply,I did it for recursive grep based on your suggestion
as shown below,
for file in *.zip ;
do
unzip -l $file | grep -ir jpg
if [ $? = 0 ]
then
echo $file
fi
done
>
> HTH.
>
> Cheers!
>
> On Wed, Jun 17, 2009 at 2:08 PM, S.Selvam <[email protected]> wrote:
>
> > Hi all,
> >
> > I have to list zip file which contain jpg files.I tried to use
> > zgrep -i *.jpg *.zip,
> > but,it does not produce expected results.Googling helped me a very
> little.
> > I welcome your suggestions.
> > Note:Preferably,I dont want to unzip before serching as it contains large
> > set zip files.
> >
> > --
> > Yours,
> > S.Selvam
> > _______________________________________________
> > To unsubscribe, email [email protected] with
> > "unsubscribe <password> <address>"
> > in the subject or body of the message.
> > http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
> >
>
>
>
> --
> දසුන්ප්රිය අනුරාධ.
> D. AnuradhA
> Step to the future with FOSS!
>
> My Blog : http://blog.mihikatha.net/
> සිංහළ blog සටහන්: http://anuradha-life.blogspot.com/
> My Photo Galleries : http://www.flickr.com/photos/dasun
> http://picasaweb.google.com/linuxdassa
> _______________________________________________
> To unsubscribe, email [email protected] with
> "unsubscribe <password> <address>"
> in the subject or body of the message.
> http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
>
--
Yours,
S.Selvam
_______________________________________________
To unsubscribe, email [email protected] with
"unsubscribe <password> <address>"
in the subject or body of the message.
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc