Adding `pgrep' and `pkill' to /usr/bin

Garance A Drosihn drosih at rpi.edu
Thu Mar 25 10:05:41 PST 2004


At 12:53 PM +0600 3/25/04, Alexey Dokuchaev wrote:
>On Wed, Mar 24, 2004, Julian Elischer wrote:
>  >
>  > On Wed, 24 Mar 2004, Garance A Drosihn wrote:
>  > >
>  > >    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.
>
>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?

NetBSD has it in the base system.  OpenBSD will soon have it in
their base system.  Solaris has it in their base system.  My
installs of Redhat 7.3 have it, although I'm not sure if that is
in the base system or some rpm that we (@RPI) add...

One nice thing about this is that the different OS's would have
the EXACT SAME options for these commands, as opposed to `ps'
where it's almost hopeless that we'll ever be able to sort out
the different options on different OS's.

>  > >    The `pkill' command searches the process table on the running
>  > > system and signals all processes that match the criteria given
>  > > on the command line.
>  >
>  > so pkill is like killall but more 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.

I agree that it would be a good idea to implement killall as a
special-case of pkill.  It might take me awhile to do this, but
I'm all for the idea.

-- 
Garance Alistair Drosehn            =   gad at gilead.netel.rpi.edu
Senior Systems Programmer           or  gad at freebsd.org
Rensselaer Polytechnic Institute    or  drosih at rpi.edu


More information about the freebsd-arch mailing list