$ find . -name "*.[ch]" -exec grep -i -H "search pharse" {} \;
I have a bash alias for this command line and find it useful for searching C code for error messages.
The -H tells grep to print the filename. you can omit the -i to match the case exactly or keep the -i for case-insensitive matching.
This find command find all .c and .h files
Submitted by bunedoggle
Options:
commandlinefu.com by David Winterbottom
0sem comentários ainda