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

前端 未结 8 694
灰色年华
灰色年华 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:33

       locate *.jar | grep Hello.class.jar
    

    The locate command to search the all path of the particular file and display full path of the file.

    example

    locate *.jar | grep classic.jar
    
    /opt/ltsp/i386/usr/share/firefox/chrome/classic.jar
    
    /opt/ltsp/i386/usr/share/thunderbird/chrome/classic.jar
    
    /root/.wine/drive_c/windows/gecko/0.1.0/wine_gecko/chrome/classic.jar
    
    /usr/lib/firefox-3.0.14/chrome/classic.jar
    
    /usr/lib/firefox-3.5.2/chrome/classic.jar
    
    /usr/lib/xulrunner-1.9.1.2/chrome/classic.jar
    
    /usr/share/firefox/chrome/classic.jar
    
    /usr/share/thunderbird/chrome/classic.jar
    

提交回复
热议问题