There is more than one way to do a recursive directory grep, in other words, search for a text string or regular expression in all the text files in an entire tree of subdirectories. You could, for example, issue the command string: find . -type f -l -exec egrep search-string {}\; or some similar combination. You might even put it all together in an shell function. But if you really want to make it useful and flexible, you will just want to write your own rgrep.c program. Yikes! This is not trivial. If, however, you chose the Perl programming language instead of C, it is almost trivial, as the rgrep Perl program by Piet van Oostrum shows. Of course, why write your own from scratch, just use Piet's excellent version; he has implemented the whole thing in 184 lines of Perl, which includes not only a help menu (accessible by running rgrep -h), a handy collection of options for specifying which kind of files to scan, and options for specifying how to interpret the search string. Piet's rgrep also does a number of things that would otherwise be difficult or impossible with the find and egrep combination: it silently skips binary files, scans compressed files intelligently. What's more, you can easily add your own options, which I have gone ahead and done with the version that is posted on ftp.uu.net:~/published/byte and BIX.