How can I grep in source files for some text?
What's the command to search for specific text in specific file types, recursively, under the current directory?
|show 1 more comment|
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
This command runs find on the local directory (.) for any files with names matching the pattern *.extension, then runs grep for "string" on the results of the find. Note that find is inherently recursive. As long as you can differentiate the files that you want from the files you don't based on name, this should work for you.
To list the file name, line number in specified file and line the text appears:
It will only run in the current directory, but it will format it nicely for you.