Date: Thu, 25 Mar 2004 12:53:14 +0600 From: Alexey Dokuchaev <danfe@nsu.ru> To: Julian Elischer <julian@elischer.org> Cc: Garance A Drosihn <drosih@rpi.edu> Subject: Re: Adding `pgrep' and `pkill' to /usr/bin Message-ID: <20040325065314.GA64827@regency.nsu.ru> In-Reply-To: <Pine.BSF.4.21.0403241550160.63489-100000@InterJet.elischer.org> References: <p0602046cbc87c722e8bc@[128.113.24.47]> <Pine.BSF.4.21.0403241550160.63489-100000@InterJet.elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 24, 2004 at 03:51:22PM -0800, Julian Elischer wrote: > > > On Wed, 24 Mar 2004, Garance A Drosihn wrote: > > > At 4:11 PM -0500 3/24/04, John Baldwin wrote: > > >On Wednesday 24 March 2004, Garance A Drosihn wrote: > > > > I noticed the upcoming version of OpenBSD will add the commands > > >> `pkill' and `pgrep', which they picked up from NetBSD. These > > >> commands also exist in Solaris and Linux. Anyone mind if I add > > >> them to FreeBSD? I'd just pick up the versions from NetBSD, and > > > > make whatever changes are needed for them to work on FreeBSD. > > > > > >What do they do? > > > > Oh. Yeah, it might help if I said something about that... > > > > The short answer: > > > > The `pgrep' command searches the process table on the running system > > and prints the process IDs of all processes that match the criteria > > given on the command line. Criteria includes matching against the > > process-name, or matching against the full-argument list of the > > processes. I've been using alias "psg = ps auxlww | grep" for pretty much the same purpose. Is there some very strong reasoning behind bringing in some new facility? > > > > The `pkill' command searches the process table on the running > > system and signals all processes that match the criteria given on > > the command line. > > > > Note that a running `pgrep' or `pkill' process will never consider > > itself nor system processes (kernel threads) as a potential match. > > > so pkill is like killall but miore flexible? > > how about you make killall a special case of pkill so we don't have the > duplication.. Seconded here. Frankly, I tend to go against populating base system with utilities of not so strict orthogonality. ./danfe
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040325065314.GA64827>