There’re times when I need to quickly search through occurrences of certain phrases in my PHP source files. Here is when I have to search for ‘giraffes’.
This is an example finding the word ‘giraffes’ in all PHP source files from the current directory recursively.
find . -name "*.php" -exec grep -i -H -n "giraffes" {} \;
This works for Ubuntu, CentOS and Mac OS X.