Skip site navigation (1)Skip section navigation (2)
Date:      16 Jun 1999 14:20:24 +0200
From:      Dag-Erling Smorgrav <des@flood.ping.uio.no>
To:        chris <chris@ns1.aepnet.com>
Cc:        Ben Smithurst <ben@scientia.demon.co.uk>, kip@lyris.com, freebsd-stable@FreeBSD.ORG
Subject:   Re: open files
Message-ID:  <xzpogigcp6f.fsf@flood.ping.uio.no>
In-Reply-To: chris's message of "Tue, 15 Jun 1999 15:39:47 -0700 (MST)"
References:  <Pine.LNX.4.04.9906151537340.20513-100000@ns1.aepnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
chris <chris@ns1.aepnet.com> writes:
> why?  I was always fond of stuff like:
> vi `find /usr/src/sys -exec grep -l "SYSCTL.*maxfiles" \{\} \;`

...which forks a separate grep process for every single file in the
source tree (somewhere between three and four thousand files,
depending on whether you use CVS or CVSup), and only shows the names
of the files where matches are found (if you remove the -l, it only
shows the matches without the file names). Neither does it allow you
to fine-tune the set of files to grep, like this:

# cd /usr/src/sys
# find . -type f | grep -v /CVS/ | xargs grep 'SYSCTL.*maxfiles'

Yes, I know about the -name predicate, but it's not very flexible
since it's a glob pattern, not a regexp, and only applies to the file
name itself, not to its path.

DES
-- 
Dag-Erling Smorgrav - des@flood.ping.uio.no


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpogigcp6f.fsf>