home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk1.iso
/
altsrc
/
articles
/
10572
< prev
next >
Wrap
Internet Message Format
|
1994-06-19
|
2KB
Path: wupost!math.ohio-state.edu!howland.reston.ans.net!pipex!uknet!EU.net!uunet!news.claremont.edu!nntp-server.caltech.edu!news
From: mazer@asterix.etho.caltech.edu (Jamie Mazer)
Newsgroups: alt.sources
Subject: Re: S-Kill [1/1] Kill by process name.
Date: 05 Jun 1994 21:49:51 GMT
Organization: Div. of Biology, Caltech
Lines: 25
Message-ID: <MAZER.94Jun5144951@asterix.etho.caltech.edu>
References: <2slfh2$f19@oak.oakland.edu> <CqsGEH.J0o@cbfsb.cb.att.com>
NNTP-Posting-Host: asterix.etho.caltech.edu
In-reply-to: philf@cbnewsf.cb.att.com's message of Thu, 2 Jun 1994 21:15:52 GMT
In article philf@cbnewsf.cb.att.com (phillipe.fischer) writes:
In article jggoslin@vela.acs.oakland.edu (Monument) writes:
>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.
>any suggestions or patches to upgrade it, please email me
>
This works for me:
alias slay set j=`ps -ax|grep !*|head -1`; kill -9 `echo $j[1]`
Sorry, I just couldn't resist, this works for me
alias slay "ps -ax|grep \!*|grep -v grep|cut -s -c1-5|xargs kill -9"
No messy temp vars left about :-b This one kills ALL matches..
/Jamie
--
EMAIL:mazer@asterix.etho.caltech.edu PHONE:(818)395-6816 FAX:(818)449-0679
USMAIL: Div. of Biology 216-76, Caltech, Pasadena, CA, USA 91125
It's a hand me down, the thoughts are broken,
perhaps they're better left unsung
... If I knew the way, I'd take you home...