Todd Goodman <[email protected]> wrote:
> * Tanstaafl <[email protected]> [150417 16:58]:
> > Hi all,
> >
> > Ok, this is driving me crazy...
> >
> > I want to be able to quickly search an entire users Maildir for an email
> > containing a certain string, but output just the filenames WITH THE
> > DATE/TIMEs...
> >
> > So, from the target users top level Maildir:
> >
> > grep -lr <searchstring> * | xargs ls -lt
> >
> > ^^^ appears to work, and does return results for the cur and new
> > subdirs, but seems to be ignoring the rest of the Maildirs. Maybe it has
> > something to do with the fact that they start with dots (ie, .Sent,
> > .Trash, etc)??
> >
> > Anyone have any idea why the above doesn't search them all?
> >
> > Thanks
>
> Try?
>
> grep -lr <searchstring> * | xargs ls -lta
>
> Maybe?
Better use the find command with -exec grep and its arguments. You
will probably need -H if you want to know the filename. The difference
is that find only ignores . and .., but does go over other things
beginning with .
--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?
John Covici
[email protected]