From owner-freebsd-fs@FreeBSD.ORG Tue Jul 12 11:29:39 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27EBD106566B for ; Tue, 12 Jul 2011 11:29:39 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id D589E8FC0A for ; Tue, 12 Jul 2011 11:29:38 +0000 (UTC) Received: by vxg33 with SMTP id 33so4607838vxg.13 for ; Tue, 12 Jul 2011 04:29:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=yXSYvA/S1CGwIFN7A3NSTFsnhhsZdKqZMnvkeSwNOLI=; b=W0Njd+ZZV+0ELL1/DagtOjotDl+J0dDN/Ae7hTLujgMPCfwT9SQu7Vs66KgTS5EHSd 0ZkWKL1srbb3s+66OTGFnRunaZM9K62eg2NxduDI4+kXhRDs1xasTReEYJQ4MTDnI3dh yL9eGv3hWQGtYC2WQkcmhbI7f627oDDih95GI= MIME-Version: 1.0 Received: by 10.52.109.38 with SMTP id hp6mr3529855vdb.435.1310470177953; Tue, 12 Jul 2011 04:29:37 -0700 (PDT) Received: by 10.52.182.225 with HTTP; Tue, 12 Jul 2011 04:29:37 -0700 (PDT) In-Reply-To: <20110712202759.H1311@besplex.bde.org> References: <10589627.445480.1310418556785.JavaMail.root@erie.cs.uoguelph.ca> <20110712202759.H1311@besplex.bde.org> Date: Tue, 12 Jul 2011 12:29:37 +0100 Message-ID: From: Tom Evans To: Bruce Evans Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD FS Subject: Re: request for review of exports.5 update X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2011 11:29:39 -0000 On Tue, Jul 12, 2011 at 11:50 AM, Bruce Evans 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= !#: