Operating System - HP-UX
1846987 Members
3630 Online
110257 Solutions
New Discussion

kill processes for a user

 
SOLVED
Go to solution
Gerard Powell
Advisor

kill processes for a user

how do I kill multiple processes for a particular user
3 REPLIES 3
Kapil Jha
Honored Contributor

Re: kill processes for a user

ps -u will list all the processes running by particular user.
ps -u |awk '{print $1}'|xargs kill

Hope this would help.
BR,
Kapil
I am in this small bowl, I wane see the real world......
Yogeeraj_1
Honored Contributor
Solution

Re: kill processes for a user

hi,

You can try:

pidusr=$(ps -ef | grep yogeeraj | awk '{print $2}')
kill -9 $pidusr


or just:

kill -9 $(ps -ef | grep yogeeraj | awk '{print $2}')


hope this helps!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
yulianto piyut
Valued Contributor

Re: kill processes for a user

try this command:

ps -ef|grep user_name|awk '{print $1}'|xargs -i kill -9 {}

-yut-