[Gllug] Flavours end - Linux begins?
Dave Cridland [Home]
dave at cridland.net
Tue Nov 19 15:09:46 UTC 2002
On Tue, 19 Nov 2002 09:08:32 +1300
Jonathan Harker <jharker at massey.ac.nz> wrote:
> On Tuesday 19 Nov 2002 1:12 am, Dave Cridland [Home] wrote:
> > Like ps being sortable, and the existence of pkill and pgrep. Those
> > three have saved me a huge amount of typing.
>
> WOW! Thanks for the tip on pgrep, I just KNEW there should be a tool for
> ps -ef | grep processname | awk '{ print $2 }'
> and
> kill `ps -ef | grep processname | awk '{ print $2 }'`
>
> I had these as little bash scripts...
Needs to be [p]rocessname anyway, otherwise the regexp matches itself.
pgrep never matches itself, and has *lots* more control for what,
exactly, you're searching, which is handy. pkill is simply pgrep | xargs
kill, in effect, but slightly neater.
Dave.
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list