How do I search files, some of which might be directories (in this case recursively) for a given string?
I'd like to search source files for a class definition, so it would also be great if there was the name of the containing file before each output string.
Best Answer
You could use grep:
This will also print the line number next to each match.
Case insensitive:
Search non-recursively in all cpp files: