Saturday, January 30, 2010

KILLING ALL THE PROCESS FOR A PARTICULAR USER

KILLING ALL THE PROCESS FOR A PARTICULAR USER

To kill all processes of a particular user from root
at unix prompt type:

# kill -9 `ps -fu username |awk '{ print $2 }'|grep -v PID`

We can also use the username as an argument and pass it from
command line, if this command is put as a script.

This command will not disconnect nor logout the user though in 
the system. 

No comments: