[SunHELP] Kill command

Subhasis Gupta subhasisg at yahoo.com
Mon Jul 8 23:30:49 CDT 2002


Try writing a script as follows (say killuser):
#!/bin/sh
user=$1
kill -9 `ps -ef | awk '$1=="$user" {print $2}'`
2>/dev/null

Then run killuser username
This would kill all the processes owned by the user
<username>.
Let me know, if this works,
Regards,
Subhasis 

--- "Zakaria A. Mattar" <zmattar at atc.com.sa> wrote:
> Dear all,
> 
> How can I kill any session using the preocess name
> not the ID
> 
> Zakaria A. Mattar
> Advanced Telecom Co.
> Operation Engineer
> Tel:   +966 1 4601877/114
> Fax:   +966 1 4601988
> Email: zmattar at atc.com.sa
> _______________________________________________
> SunHELP maillist  -  SunHELP at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/sunhelp
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com



More information about the SunHELP mailing list