From owner-freebsd-questions@FreeBSD.ORG Sun Sep 15 06:22:23 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DE2CCC55 for ; Sun, 15 Sep 2013 06:22:23 +0000 (UTC) (envelope-from kline@thought.org) Received: from p3plsmtpa06-05.prod.phx3.secureserver.net (p3plsmtpa06-05.prod.phx3.secureserver.net [173.201.192.106]) by mx1.freebsd.org (Postfix) with ESMTP id C37DE20B2 for ; Sun, 15 Sep 2013 06:22:23 +0000 (UTC) Received: from ethic.thought.org ([209.180.213.209]) by p3plsmtpa06-05.prod.phx3.secureserver.net with id RJLm1m0054XeM0101JLmGA; Sat, 14 Sep 2013 23:20:47 -0700 Date: Sat, 14 Sep 2013 23:20:46 -0700 From: Gary Kline To: FreeBSD Mailing List Subject: howto kill x if x is running? Message-ID: <20130915062046.GA12535@ethic.thought.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 06:22:23 -0000 Organization: Thought Unlimited. Public service Unix since 1986. Of_Interest: With 27 years of service to the Unix community. guys, I've evidently had too many pain meds; this shelll script should be easy. say that I have a utility xxx running sometimes. xxx is soaking up a chunk of my load. I have to use top to find if xxx is running, then kill -9 to kill xxx and have a steady load of, say, between 0.10 and 0.15. what's the script that can do this? gary -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix Twenty-seven years of service to the Unix community. http://www.thought.org/HOPE