Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!VAX1.CC.UAKRON.EDU!r3jjs From: r3jjs@VAX1.CC.UAKRON.EDU (Jeremy J Starcher) Newsgroups: comp.unix.shell Subject: Killing run away processes Keywords: shell, kill Message-ID: <708@VAX1.CC.UAKRON.EDU> Date: 2 Oct 90 19:23:34 GMT References: <1815@utoday.UUCP> <1990Sep29.024105.29939@chinet.chi.il.us> <1819@utoday.UUCP> Reply-To: r3jjs@VAX1.CC.UAKRON.EDU (Jeremy J Starcher) Organization: U of Akron Computer Center, Ohio Lines: 17 #!/bin/sh ######################################################################### # This shell script will zot (kill -9) all process except the user's # # shells. Several processes will return as none existent or some other # # error. Ignore those. # # # # This script file is dedicated to all those who find themselves with # # a program that quickly goes out of control and need a way to # # terminate it quickly. # # # # Caveat: This script must be named zot # # # # Author: Jeremy J Starcher (r3jjs@vax1.cc.uakron.edu) # # Date: 2 October 1990 # ######################################################################### kill -9 `ps -aux | grep $USER | grep -v -e -csh | grep -v 'sh zot' | cut -c10-15 | paste -s -`