From: covici@ccs.covici.com
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] grep -lr ignoring subdirs that start with dot (.)?
Date: Fri, 17 Apr 2015 18:02:47 -0400 [thread overview]
Message-ID: <5594.1429308167@ccs.covici.com> (raw)
In-Reply-To: <20150417214710.GO7561@ns1.bonedaddy.net>
Todd Goodman <tsg@bonedaddy.net> wrote:
> * Tanstaafl <tanstaafl@libertytrek.org> [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
covici@ccs.covici.com
next prev parent reply other threads:[~2015-04-17 22:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-17 20:57 [gentoo-user] grep -lr ignoring subdirs that start with dot (.)? Tanstaafl
2015-04-17 21:47 ` Todd Goodman
2015-04-17 22:02 ` covici [this message]
2015-04-17 21:59 ` Neil Bothwick
2015-04-23 11:32 ` Tanstaafl
2015-04-23 14:45 ` Neil Bothwick
2015-04-19 11:12 ` Andreas K. Huettel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5594.1429308167@ccs.covici.com \
--to=covici@ccs.covici.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox