laredotornado@[EMAIL PROTECTED]
wrote:
> Hi,
>
> I'm SSH'ed in to a Mac OS X server through PuTTY client running on a
> Windows XP machine. I am trying to find a file "Servlet.class" that is
> in a .jar file, but I don't know which one. Given a parent directory,
> /cl*****, that contains JARS at many different subdirectory levels, is
> there a command I can use to search for "Servlet.class" amidst all the
> jars? This must be a command I can run from the Unix-like console, as
> I can't access the Desktop directly. I'd prefer not to have to unzip
> each one and run "find".
find cl***** -name "*.jar" -exec jar tvf {} \; |grep "Servlet\.class"
should get you started.
I'm not sure of a way to prepend the currently found jarfile, otherwise
you could
find cl***** -name "*.jar" -print -exec jar tvf {} \; > out_file
and then search out_file for Servlet.class, then upwards to find the
jarfile it's in.


|