sslug-teknik team mailing list archive
-
sslug-teknik team
-
Mailing list archive
-
Message #18837
Re: script til at stoppe en proces
Ku' jo lisegodt lave et brugbart script med det samme:
---
#! /bin/sh
# Killbyname - kill a process by name supplied on commandline
# monz/20000217
# Rev. 0.9
if ! [ $1 ]; then
echo "usage: Killbyname argument"
exit 0
fi
kill -9 `ps --no-headers -C $1 |cut -f 1 -d ' '`
---
Læg det i fx. /us/local/bin og chmod 700 eller whatever.
--
Mogens Valentin - mailto:monz@xxxxxxxxx - WWW: http://www.danbbs.dk/~monz/
Web, Programming, Network, Security - Guides for Linux, Xwindow and more..
Skaane/Sjaelland Linux User Group (4800++ members!) - http://www.sslug.dk/
Get a grip, get http://www.linux.org/, freedom of choice and free software
References