🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1441

Re: Killing run away processes

#1441
From: Hans Mulder
Date: Tue, 09 Oct 1990 09:55
33 lines
1842 bytes
In article <708@VAX1.CC.UAKRON.EDU> r3jjs@VAX1.CC.UAKRON.EDU (Jeremy J Starcher) writes:
>#!/bin/sh
>#########################################################################
>#  This shell script will zot (kill -9) all process except the user's	#
>#  shells.	 							#

Moreover, it will also kill all the user's shells, except maybe their
login shell if it happens be named csh.  It will also kill their
window system if they use one, preferably leaving their terminal
in an unusable state.

>#  	    Several processes will return as none existent or some other #
>#  error.  Ignore those.						#

You don't like reliable software, do you?

>#  Caveat:  This script must be named zot                               #

Translation: "zot" is the Dutch word for "fool".

>#  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 -`

Ignore in particular any messages "sh: cut: not found" and "sh: paste:
not found".  Those merely indicate you live in BSD land and you knew
that already.

Have a nice day,

Hans Mulder	hansm@cs.kun.nl
Technical Details
Message-ID: <2268@wn1.sci.kun.nl>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!aplcen!samsung!cs.utexas.edu!yale!mintaka!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!sci.kun.nl!cs.kun.nl!hansm
References: <1815@utoday.UUCP> <1990Sep29.024105.29939@chinet.chi.il.us> <1819@utoday.UUCP> <708@VAX1.CC.UAKRON.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!aplcen!samsung!cs.utexas.edu!yale!mintaka!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!sci.kun.nl!cs.kun.nl!hansm
From: hansm@cs.kun.nl (Hans Mulder)
Newsgroups: comp.unix.shell
Subject: Re: Killing run away processes
Summary: Use at own risk
Keywords: shell, kill
Message-ID: <2268@wn1.sci.kun.nl>
Date: 9 Oct 90 09:55:33 GMT
References: <1815@utoday.UUCP> <1990Sep29.024105.29939@chinet.chi.il.us> <1819@utoday.UUCP> <708@VAX1.CC.UAKRON.EDU>
Sender: root@sci.kun.nl
Organization: University of Nijmegen, The Netherlands
Lines: 33