Monday, April 16, 2012

I needed to find a file in a list of jar files, but did not know which one.

The following command will list all jar files in the current directory, and pass them into the "jar tf" command to display the table of contents. The results will then be grep'd for the file_name

find -name "*.jar" | xargs -n 1 jar tf | grep -i

No comments:

Post a Comment