From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Sergey Degtyaryov X-Mailer: The Bat! (v1.39) Educational X-Priority: 3 (Normal) Message-ID: <19852.010424@globetravel.spb.ru> To: "Dmitry V. Levin" In-reply-To: <20010424200516.B7026@ldv.office.alt-linux.org> References: <20010424200516.B7026@ldv.office.alt-linux.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit Subject: [mdk-re] =?koi8-r?B?UmU6IFttZGstcmVdIFJlOiBbbWRrLXJlXSDrwcsg1cLJ1NggcHBwZD8=?= Sender: mandrake-russian-admin@altlinux.ru Errors-To: mandrake-russian-admin@altlinux.ru X-BeenThere: mandrake-russian@altlinux.ru X-Mailman-Version: 2.0 Precedence: bulk Reply-To: mandrake-russian@altlinux.ru X-Reply-To: Sergey Degtyaryov List-Help: List-Post: List-Subscribe: , List-Id: Mandrake/RE discussion list List-Unsubscribe: , List-Archive: Date: Tue Apr 24 20:26:12 2001 X-Original-Date: Tue, 24 Apr 2001 20:27:43 +0400 Archived-At: List-Archive: List-Post: Доброго времени суток, Dmitry, 24.04.2001 в 20:05 Вы сказали буквально следующее: Dmitry> Убить процесс /usr/sbin/pppd можно, скажем, выполнив Dmitry> "killall /usr/sbin/pppd". Однако делать это Вам, скорее всего, не нужно. Dmitry> Сформулируйте задачу конкретнее, и ответ будет более точным. Dmitry> Regards, Dmitry> Dmitry О пользе чтения man, как раз. Надо было читать к killall. Но все равно, может кому-то лень набирать /usr/sbin =) Будем считать - практиковался. SINOPSYS : killcom [-l] process -l - не убивать\показать *killcom #!/usr/bin/perl foreach (@ARGV) { push (@keys, shift @ARGV), next if /-\w/; } $victim = shift @ARGV; open (PS, "ps ax |"); while () { ($pid, $tty, $stat, $time, $command) = split (' '),last if /(\d+)\s+(\w+)\s+(\w+)\s+(.*?)\s+($victim)/; } close (PS); #print getppid, $pid; #exit; print "No such process : $victim\n",exit if ((!$pid) || ($pid eq getppid)); print "Found process : $pid $tty $stat $time $command\n";exit if ($keys[0] eq '-l'); print "killing $command\n"; print "Killed successfully\n" if (kill 9, $pid); \\|||// ( O O ) С уважением, Сергей -oOOO--(_)--OOOo---------------------------------