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.

[code lang=“bash”]find . -name “*.php” -exec grep -i -H -n “giraffes” {} ;[/code]

This works for Ubuntu, CentOS and Mac OS X.

comments powered by Disqus