Linux cmd to search for a class file among jars irrespective of jar path

前端 未结 8 676
灰色年华
灰色年华 2021-01-29 23:58

I want to search for a particular class file among many jar files without giving the location of each jar file.

Is this possible with a simple command?

I tried t

8条回答
  •  囚心锁ツ
    2021-01-30 00:53

    eric@dev /home/el/kafka_2.10-0.8.1.1/libs $ for i in `find . -name "*.jar"`; do
    > echo $i
    > done
    
    ./slf4j-api-1.7.2.jar
    ./zookeeper-3.3.4.jar
    ./kafka_2.10-0.8.1.1-javadoc.jar
    ./kafka_2.10-0.8.1.1-sources.jar
    

提交回复
热议问题