Gentoo Archives: gentoo-user

From: Tanstaafl <tanstaafl@×××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] grep -lr ignoring subdirs that start with dot (.)?
Date: Thu, 23 Apr 2015 11:33:07
Message-Id: 5538D866.80309@libertytrek.org
In Reply to: Re: [gentoo-user] grep -lr ignoring subdirs that start with dot (.)? by Neil Bothwick
1 On 4/17/2015 5:59 PM, Neil Bothwick <neil@××××××××××.uk> wrote:
2 > Since you want to search the entire contents f the current directory,
3 > there is no need to pass grep a list of directories (especially not an
4 > incomplete list), use "grep -lr ."
5
6 Ok, thanks Neil, but this is still not what I'm looking for... here's a
7 snip of what I got:
8
9 > ./user1/Maildir/.Sent/cur/1348064019.M219121P18374.mailhost.com,S=7615,W=7788:2,S
10 > ./user1/Maildir/.Sent/dovecot.index.cache
11 > ./user2/Maildir/cur/1348063111.Vfe02Ia7fe0eM242648.mailhost.com:2,S
12 > ./user2/Maildir/dovecot.index.cache
13
14 What I'd like is the output you get with
15
16 'grep -ir "searchstring" .'
17
18 which includes the line of text from each matching file that contains
19 the searchstring, like this:
20
21 > ./user/Maildir/cur/1429731479.M511050P25876.hostname,S=3097,W=3185:2,S:Name asked me to approve Test PO 12036 this afternoon so she could see
22 > ./user/Maildir/cur/1429731479.M511050P25876.hostname,S=3097,W=3185:2,S:it in the system. In looking at Test PO 12033 & 12034 they show signed
23 > ./user/Maildir/cur/1429731479.M511050P25876.hostname,S=3097,W=3185:2,S:by me however I did not approve these test PO's only test PO 12036 - how
24 > ./user/Maildir/cur/1429731479.M511050P25876.hostname,S=3097,W=3185:2,S: Name asked me to approve Test PO 12036 this afternoon so she could
25
26 but...
27
28 What I'd like is for each output line showing the file-hit to be
29 prefaced with at least the date/time of the file (permissions/owner etc
30 would be ok too, but I at least need the date/time), like you get when
31 doing an ls -al...
32
33 Is this just not possible?
34
35 Thanks again...

Replies

Subject Author
Re: [gentoo-user] grep -lr ignoring subdirs that start with dot (.)? Neil Bothwick <neil@××××××××××.uk>