home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk1.iso
/
altsrc
/
articles
/
10559
< prev
next >
Wrap
Text File
|
1994-06-19
|
2KB
|
44 lines
Path: wupost!psuvax1!news.pop.psu.edu!news.cac.psu.edu!newsserver.jvnc.net!newsserver.nj.nec.com!syl!somesh
From: somesh@syl.nj.nec.com (Somesh Rao)
Newsgroups: alt.sources
Subject: Re: S-Kill [1/1] Kill by process name.
Date: 3 Jun 1994 11:22:53 GMT
Organization: NEC Systems Laboratory, Inc.
Lines: 31
Message-ID: <2sn3qd$at4@newsserver.nj.nec.com>
References: <2slfh2$f19@oak.oakland.edu>
NNTP-Posting-Host: syl.nj.nec.com
X-Newsreader: TIN [version 1.1 PL9]
Monument (jggoslin@vela.acs.oakland.edu) wrote:
: I happened to make this last time I was bored, and saw that the
: interest was there. It's written in C, and does pretty much what
: "name-kill" does, except that it can use any portion of the name. The
: drawback to this, however, is that it automatically kills anything
: that matches the search string, WITHOUT CHECKING.
That looks like over-kill. I just have these two aliases for process kill.
For SVR4 systems
alias slay 'set j=`ps -ef | grep \!* | grep $USER |grep -v grep `; kill -9 `echo $j[2]`'
For SunOS 4.1 and BSD systems
alias slay 'set j=`ps -aux | grep \!* | grep $USER |grep -v grep `; kill -9 `echo $j[2]`'
And to list without killing
alias psg 'ps -ef | grep \!* |grep $USER | grep -v grep'
alias psg 'ps -aux | grep \!* |grep $USER | grep -v grep'
Somesh
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Somesh Rao somesh@syl.nj.nec.com
NEC Systems Lab, 609-734-6115 (Voice)
4 Independence Way, 609-734-6002 (FAX)
Princeton, NJ 08540
#include <std-disclaimer.h>
I speak for myself. I do not speak for NEC and NEC does not speak for me.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=