Last Updated: February 25, 2016
·
421
· hartleybrody

Simple Search for String

I'm sure this is obvious for any Unix guru, but I constantly find myself looking this command up when I need it, so I'm writing it here.

To see every place where a certain string (say, a variable name, function call, etc) appears in your codebase, navigate to the root of your project and run:

grep -r --color "<search_term>" .

Don't forget the dot on the end. I like the color flag cause.. why not.