Some times, we may be in situation to find the list of files in a recursive directory and search for a specific contents in it.
Below is the command which does that. In below command I'm trying to find commons-beanutils.jar recursive in a directory and a grep command on the listed files to actually find do the jar files has class file 'BeanUtilsBean.class in it.
find . -name *beanutils*.jar -exec grep 'BeanUtilsBean.class' '{}' \;
No comments:
Post a Comment