(M-x rgrep in Emacs == grep -r everywhere else)
Emacs' rgrep DIR PATTERN REGEX translates to
find DIR \( -path \*/SCCS -o -path \*/RCS -o -path \*/CVS \ -o -path \*/MCVS -o -path \*/.svn -o -path \*/.git \ -o -path \*/.hg -o -path \*/.bzr -o -path \*/_MTN \ -o -path \*/_darcs -o -path \*/\{arch\} \) -prune \ -o -type f \( -name PATTERN \) -print0 \ | xargs -0 -e grep -i -nH -e REGEX
(M-x rgrep in Emacs == grep -r everywhere else)