Date: Tue, 12 Jul 2011 12:29:37 +0100 From: Tom Evans <tevans.uk@googlemail.com> To: Bruce Evans <brde@optusnet.com.au> Cc: FreeBSD FS <freebsd-fs@freebsd.org> Subject: Re: request for review of exports.5 update Message-ID: <CAFHbX1%2BQcrcgbxUPSoLTew_LG_G5qSHa6dMxfCjhEy56c5h_Yg@mail.gmail.com> In-Reply-To: <20110712202759.H1311@besplex.bde.org> References: <10589627.445480.1310418556785.JavaMail.root@erie.cs.uoguelph.ca> <alpine.GSO.1.10.1107111939390.6818@multics.mit.edu> <20110712202759.H1311@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 12, 2011 at 11:50 AM, Bruce Evans <brde@optusnet.com.au> wrote: > BTW, does anyone know a good way of not seeing duplicates in commands > like "zgrep -r wrt /usr/share/man"? =C2=A0find(1) doesn't seem to have an= y > flag to suppress duplicates. =C2=A0du(1) has to know how to not count > duplicates internally. =C2=A0I think it as special code for this and ther= e > is no special support for this in fts(3). =C2=A0Recently I have been anno= yed > by duplicates under .svn. =C2=A0I want to type a simple grep -r or > "find . | xargs grep" without any complicated pattern for the file names > and not see multiple copies. > > Bruce This probably won't help in this case, but I use ack [1] to search source. It's smarter than grep, it knows not to look at VC files or directories, object files, etc. Its written in standalone perl [2], so you can just drop it in your ~/bin. Your pattern can use all of PCRE, and it knows all about lots of different file types, eg "ack --hh" will just search headers. It won't help in this case though, since it doesn't know how to look inside gzipped files. Cheers Tom [1] http://betterthangrep.com/ [2] curl http://betterthangrep.com/ack-standalone > ~/bin/ack && chmod 0755= !#:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFHbX1%2BQcrcgbxUPSoLTew_LG_G5qSHa6dMxfCjhEy56c5h_Yg>