home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk1.iso
/
altsrc
/
articles
/
10636
< prev
next >
Wrap
Internet Message Format
|
1994-06-19
|
937b
Path: wupost!uhog.mit.edu!news.kei.com!travelers.mail.cornell.edu!cornell!rochester!udel!itchy.ee.udel.edu!kelleher
From: kelleher@itchy.ee.udel.edu (Jason D. Kelleher)
Newsgroups: alt.sources
Subject: Re: S-Kill [1/1] Kill by process name.
Date: 10 Jun 1994 17:59:39 GMT
Organization: University of Delaware
Lines: 15
Message-ID: <2ta9mb$8s7@louie.udel.edu>
References: <2slfh2$f19@oak.oakland.edu> <CqsGEH.J0o@cbfsb.cb.att.com> <MAZER.94Jun5144951@asterix.etho.caltech.edu> <1994Jun9.092416.1@ma208a.lamar.edu>
NNTP-Posting-Host: itchy.ee.udel.edu
Here's my "user killer".
#!/bin/csh -f
if ( $#argv < 1 ) then
echo "Usage: masskill username..."
exit
endif
if ( "$1" == "root" || "$1" == `whoami` ) then
echo ""; echo "That wouldn't be very prudent. Now would it?"; echo ""
exit
endif
foreach user ($argv[1-])
/usr/bin/kill -15 `/bin/ps -augx | egrep "^$user" | awk -e '{print $2}'`
end