home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk1.iso / altsrc / articles / 10559 < prev    next >
Text File  |  1994-06-19  |  2KB  |  44 lines

  1. Path: wupost!psuvax1!news.pop.psu.edu!news.cac.psu.edu!newsserver.jvnc.net!newsserver.nj.nec.com!syl!somesh
  2. From: somesh@syl.nj.nec.com (Somesh Rao)
  3. Newsgroups: alt.sources
  4. Subject: Re: S-Kill [1/1]  Kill by process name.
  5. Date: 3 Jun 1994 11:22:53 GMT
  6. Organization: NEC Systems Laboratory, Inc.
  7. Lines: 31
  8. Message-ID: <2sn3qd$at4@newsserver.nj.nec.com>
  9. References: <2slfh2$f19@oak.oakland.edu>
  10. NNTP-Posting-Host: syl.nj.nec.com
  11. X-Newsreader: TIN [version 1.1 PL9]
  12.  
  13. Monument (jggoslin@vela.acs.oakland.edu) wrote:
  14. : I happened to make this last time I was bored, and saw that the
  15. : interest was there.  It's written in C, and does pretty much what
  16. : "name-kill" does, except that it can use any portion of the name.  The
  17. : drawback to this, however, is that it automatically kills anything
  18. : that matches the search string, WITHOUT CHECKING.  
  19.  
  20. That looks like over-kill. I just have these two aliases for process kill.
  21.  
  22. For SVR4 systems
  23. alias slay  'set j=`ps -ef | grep \!* | grep $USER |grep -v grep `; kill -9 `echo $j[2]`'
  24.  
  25. For SunOS 4.1 and BSD systems
  26. alias slay  'set j=`ps -aux | grep \!* | grep $USER |grep -v grep `; kill -9 `echo $j[2]`'
  27.  
  28. And to list without killing 
  29. alias psg   'ps -ef | grep \!* |grep $USER | grep -v grep'
  30. alias psg   'ps -aux | grep \!* |grep $USER | grep -v grep'
  31.  
  32.  
  33. Somesh
  34. --
  35. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  36. Somesh Rao                somesh@syl.nj.nec.com
  37. NEC Systems Lab,            609-734-6115 (Voice)
  38. 4 Independence Way,                     609-734-6002 (FAX)
  39. Princeton, NJ 08540
  40.  
  41. #include <std-disclaimer.h>
  42. I speak for myself. I do not speak for NEC and NEC does not speak for me.
  43. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  44.