grep file name filter code example
Example 1: grep only in php files
grep -r -i --include=\*.php 'searchterm' ./
Example 2: grep search for text in php files recursive
grep -r "string to search for" ./
grep -r -i --include=\*.php 'searchterm' ./
grep -r "string to search for" ./