-2

I want to search All .java files in current directory and subdirectories that ends with .java and have text "SSL" in that file. Any help on this?? I tried grep -rnq -e "SSL" but its taking so much time. Thanks in advance.

Ravi Godara
  • 497
  • 6
  • 20
  • All ".java" files end with ".java", and how is this question related to "Java" tag? – Aakash May 19 '15 at 09:20
  • Duplicate of http://stackoverflow.com/questions/16956810/finding-all-files-containing-a-text-string-on-linux – SaeX May 19 '15 at 09:24

1 Answers1

1

I think you must use find to improve your search and then you grep it

for FILE in $(find -name *.java);do grep SSL $FILE > /dev/null && echo $FILE;done

or

find . -name '*.java' | xargs grep "SSL" -sl