Thursday 24 October 2013

Finding files inside a jar - Linux


Problem: I have to find a jar file in which class named DataSource is present.

Solution: We can use linux find command along with grep to do this job.

 
find -name "*.jar" |  xargs grep -l "DataSource"
The above command searches for DataSource class in all jar files located in current working directory

No comments:

Post a Comment