On Thursday, Feb 2nd 2006 at 09:50 -0800, quoth Rick Stevens:
=>To search ALL files, display the files with matching names AND the line =>that matches: => => # find / -exec grep -iH pattern {} ; => =>Modify the find command to exclude directories you know you aren't =>interested in. For example to ignore any "mail" directories: => => # find / -path "*mail*" -prune -o -exec grep -iH pattern {} ;
GGAAAAAHH!
find dir -type f | xargs grep stuff
Learn it. Love it. The Bad Way will generate a child process to search one file. The Good Way will generate the minimal number of grep processes to do the job. Also note the use of -type f so you don't seaarch devices and directories.