Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] Select and kill running process


On Tue, Aug 22, 2000 at 09:50:25AM +1000, Terry Collins wrote:
> list process | grep desired-process | kill desired-process
> 
> Can someone tell me the format of the last part?
> 
> ps axf | grep process | kill -9 "process???"

If they are all 5 digit pids, you can use

	ps axf | grep process | cut -d' ' -f1 | xargs kill

For 4 digit pids, you need to use -f2 in the cut.

Cheers,
Malcolm

-- 
Malcolm Tredinnick            email: malcolm@xxxxxxxxxxxxxxxxx
CommSecure Pty Ltd

Attachment: pgpGcPIbLQZn5.pgp
Description: PGP signature