Kill all processes of a user on Solaris

Since this was the third time I was searching the web for a way to murder all processes of a particular user, I decided to write it down:

# kill `ps -fu user_name_here | awk 'NR != 1 {print $2}'`
Comments:

man pkill

Posted by x on August 19, 2008 at 12:24 PM CEST #

kill -9 -1

Posted by Alain on August 19, 2008 at 01:22 PM CEST #

How about 'pkill -U user_name_here'?

Posted by Jim on August 19, 2008 at 01:27 PM CEST #

kill -9 -1 is easy to remember, and it's always effective.
But just remember that the -9 is going to brutally shut down the processes without giving their signal handlers a chance to cleanup.

Posted by stevej on August 19, 2008 at 02:29 PM CEST #

kill -9 -1 where I will write username ?
and
pkill -U username is working under Solaris?

Posted by rpuserh on February 06, 2011 at 01:24 PM CET #

@rpuserh
Of course it is working. See man or use pkill -U <username>

I don't know what's the big deal with that... awks, pipes. Let's shoot flies with guns. Good approach. ...ok... maybe in Solaris 8 or ealier ;-)

Posted by barte-k on February 21, 2011 at 08:24 AM CET #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Members of the EMEA Globalization Center are blogging about the products that comprise the Java Enterprise System stack.

Search

Archives
« July 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today