Thanks, BG. Sample output:
[me@myserver somedir]# find ./ -iregex .+\.php$ -type f -print | xargs grep -il 'cc_1.php'
./account/user/account_colleges.php
./account_panel_on.php
./community/includes/functions_myplan.php
etc...
That works quite well, but the command is pretty hard to type. I use this command dozens of times an hour and am really hoping to streamline it. Also, I don't see how I can modify it to search a variety of file suffixes (php, php4, html, htm, txt, etc.).
I'm wondering if I might create an alias for a command like this somehow? I.e., a command where I just supply 'some string' to a command and it does a recursive grep search which is limited to certain file types.
Here are some other options I've discovered which also seem to work similar to your command:
[me@myserver somedir]# grep -rl --include=*.php 'cc_1.php' *
account/user/account_colleges.php
account_panel_on.php
community/includes/functions_myplan.php
etc...
another find command:
[me@myserver test]# find * -name '*.php' -exec grep -l 'cc_1.php' {} \;
account/user/account_colleges.php
account_panel_on.php
community/includes/functions_myplan.php
etc...