How would I search all .java files for a simple string (not a regex) in the current directory and all sub-directories on Mac OS X? I just want to print a list of file and directory names that match.
Macos – grep all .java files in a directory for a particular string
grepmacmacosunix
Best Answer
And the always popular
EDIT (by Frank Szczerba):
If you are dealing with filenames or directories that have spaces in them, the safest way to do this is:
There's always more than one way to do it.