[Linux-disciples] Kill multiple processes

Adam Rosi-Kessel adam at rosi-kessel.org
Tue Jan 4 10:02:10 EST 2011


On 1/4/2011 10:01 AM, Stephen R Laniel wrote:
> On Jan 4, 2011, at 10:02 AM, Jamie Forrest wrote:
>
>> I want to kill all the processes returned by a ps | grep. What's the quickest way to do that?
> You could also do
>
> ps aux |grep foo |awk '{print $2}' |xargs kill
>
> (untested, but try it out -- obviously testing first without the 'kill')
>
Apparently you beat me to the punch. But I would throw in the grep -v grep.


More information about the Linux-disciples mailing list