#はじめに
このクラスファイルどのjarに入ってるんだろう?って時に特定ディレクトリ配下のjar内をまとめて検索する方法
##以下のコマンドを実行するだけ
for FILE in $(find 検索ディレクトリ -name '*.jar') ; do echo $FILE ; jar -tvf $FILE | grep 検索したいファイル ; done
###実行例
[root@server01 ~]# for FILE in $(find /usr/lib/jvm -name '*.jar') ; do echo $FILE ; jar -tvf $FILE | grep String.class ; done
/usr/lib/jvm/java-1.8.0-ibm-1.8.0.4.5-1jpp.1.el7_3.x86_64/lib/jconsole.jar
/usr/lib/jvm/java-1.8.0-ibm-1.8.0.4.5-1jpp.1.el7_3.x86_64/lib/ibmorbtools.jar
/usr/lib/jvm/java-1.8.0-ibm-1.8.0.4.5-1jpp.1.el7_3.x86_64/lib/dt.jar
/usr/lib/jvm/java-1.8.0-ibm-1.8.0.4.5-1jpp.1.el7_3.x86_64/lib/tools.jar
817 Thu Apr 20 05:15:06 JST 2017 com/sun/tools/javac/api/Formattable$LocalizedString.class
2990 Thu Apr 20 05:23:04 JST 2017 com/sun/tools/jdi/JDWP$VirtualMachine$CreateString.class
1346 Thu Apr 20 05:16:12 JST 2017 com/sun/xml/internal/rngom/parse/compact/CompactSyntax$LocatedString.class
1263 Thu Apr 20 05:16:00 JST 2017 com/sun/xml/internal/xsom/XmlString.class
/usr/lib/jvm/java-1.8.0-ibm-1.8.0.4.5-1jpp.1.el7_3.x86_64/jre/lib/ibmjsseprovider2.jar
/usr/lib/jvm/java-1.8.0-ibm-1.8.0.4.5-1jpp.1.el7_3.x86_64/jre/lib/ibmsaslfw.jar
/usr/lib/jvm/java-1.8.0-ibm-1.8.0.4.5-1jpp.1.el7_3.x86_64/jre/lib/tools/monitoring-api.jar
/usr/lib/jvm/java-1.8.0-ibm-1.8.0.4.5-1jpp.1.el7_3.x86_64/jre/lib/se-service.jar
/usr/lib/jvm/java-1.8.0-ibm-1.8.0.4.5-1jpp.1.el7_3.x86_64/jre/lib/management-agent.jar
/usr/lib/jvm/java-1.8.0-ibm-1.8.0.4.5-1jpp.1.el7_3.x86_64/jre/lib/aggressive.jar
/usr/lib/jvm/java-1.8.0-ibm-1.8.0.4.5-1jpp.1.el7_3.x86_64/jre/lib/dataaccess.jar
/usr/lib/jvm/java-1.8.0-ibm-1.8.0.4.5-1jpp.1.el7_3.x86_64/jre/lib/ibmjgssfw.jar
/usr/lib/jvm/java-1.8.0-ibm-1.8.0.4.5-1jpp.1.el7_3.x86_64/jre/lib/charsets.jar
/usr/lib/jvm/java-1.8.0-ibm-1.8.0.4.5-1jpp.1.el7_3.x86_64/jre/lib/ibmcfw.jar
/usr/lib/jvm/java-1.8.0-ibm-1.8.0.4.5-1jpp.1.el7_3.x86_64/jre/lib/amd64/default/jclSC180/vm.jar
35433 Wed Apr 19 10:19:28 JST 2017 java/lang/String.class
/usr/lib/jvm/java-1.8.0-ibm-1.8.0.4.5-1jpp.1.el7_3.x86_64/jre/lib/amd64/default/jclSC180/j9zip.jar
/usr/lib/jvm/java-1.8.0-ibm-1.8.0.4.5-1jpp.1.el7_3.x86_64/jre/lib/amd64/compressedrefs/jclSC180/vm.jar
35433 Wed Apr 19 10:19:28 JST 2017 java/lang/String.class
/usr/lib/jvm/java-1.8.0-ibm-1.8.0.4.5-1jpp.1.el7_3.x86_64/jre/lib/amd64/compressedrefs/jclSC180/j9zip.jar
/usr/lib/jvm/java-1.8.0-ibm-1.8.0.4.5-1jpp.1.el7_3.x86_64/jre/lib/ibmorb.jar
/usr/lib/jvm/java-1.8.0-ibm-1.8.0.4.5-1jpp.1.el7_3.x86_64/jre/lib/security/US_export_policy.jar
/usr/lib/jvm/java-1.8.0-ibm-1.8.0.4.5-1jpp.1.el7_3.x86_64/jre/lib/security/local_policy.jar
/usr/lib/jvm/java-1.8.0-ibm-1.8.0.4.5-1jpp.1.el7_3.x86_64/jre/lib/math.jar
(略)
[root@server01 ~]#