I am trying to find all the jars which has spring
in its name. I am working with windows and using cygwin to run the linux commands. Does my below command looks right?
find . -name "*.jar" -exec jar tf '{}' \| grep -H "spring" \;
For some reason, it is still processing and haven't got the result on the screen. Any fast way to grep the jar file with a particular name?
For example, below are the valid jar files which has spring in it –
spring-web.jar
spring-core.jar
test-spring.jar
Best Answer
I do not believe the
jar
command accepts multiple.jar
files by way of arguments so AFAIK a singlejar
invocation addressing all.jar
files is out of the question. One option to speed things up by avoiding onefind
exec invocation for each.jar
file is the follows