List contents of multiple jar files

前端 未结 9 844
情歌与酒
情歌与酒 2021-02-02 10:50

I am searching for a .class file inside a bunch of jars.

jar tf abc.jar 

works for one file. I tried

find -name \"*.jar\" | xa         


        
9条回答
  •  你的背包
    2021-02-02 11:45

    I don't see the necessity for using exec, this worked for me in Cygwin on Windows:

    find . -name "*.jar" | while read jarfile; do unzip -l $jarfile | fgrep "foo" ; done 
    

提交回复
热议问题