
Bash Shell Awesomeness - Mass Killing Processes (On Ubuntu) - askorkin
http://www.skorks.com/2009/08/bash-shell-awesomeness-mass-killing-processes-on-ubuntu/
======
jgrahamc
You could just use killall.

<http://linux.die.net/man/1/killall>

~~~
ap
... or use pkill:

    
    
      pkill -9 -U lusername
    

Unlike in Linux, in most unices killall(1) terminates _all_ the processes

~~~
lucumo
_> Unlike in Linux, in most unices killall(1) terminates all the processes_

Hehe... That reminds me of the day I learned that you shouldn't put . in your
path, especially in the front.

It turns out that (old?) Red Hat machines had a script 'killall' in their
/etc/init.d ...

------
ja27
su to that user and "kill 0" or safer "kill -1".

------
ilyak
He should really use awk instead of cut. or killall and for awesomeness, he
should use zsh. bash is what you use for mediocrity.

~~~
xelfer
Why awk instead of cut?

~~~
ilyak
awk treats input as lines and columns, therefore it would be more accurate
than cut that treats input as lines and characters.

You don't want charaters this to that, what you do want is column 2.

~~~
omail
cut -d ' ' -f 2

