On Fri, Apr 26, 2002 at 11:12:35AM -0400, Shawn McMahon wrote: > cd maildir > find . -exec grep -l "stuff" {} \; That works, but find -exec is inefficient, because it runs grep once per file, while grep is perfectly capable of looking at multiple files per run. It's better to use -print and xargs(1). Also, you only want to try to grep files, not subdirectories, so you probably want to specify -type f. That gives you this:
find . -type f -print | xargs grep -l "stuff" When run, that command will list all the folders containing "stuff". If you instead want to see all of the actual lines that contain "stuff", just leave off the '-l' option to grep. Unfortunately, grep won't tell you which mail message within the folder contains the text; you need mailgrep or some other third-party add-on program for that. -- Mark REED | CNN Internet Technology 1 CNN Center Rm SW0831G | [EMAIL PROTECTED] Atlanta, GA 30348 USA | +1 404 827 4754 -- Advertisements contain the only truths to be relied on in a newspaper. -- Thomas Jefferson