1.\" Copyright (C) 1995 by Joerg Wunsch, Dresden 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS 14.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 15.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 16.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, 17.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 18.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 19.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 21.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 22.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23.\" POSSIBILITY OF SUCH DAMAGE. 24.\" 25.\" $FreeBSD$ 26.\" 27.Dd June 25, 1995 28.Os FreeBSD 2.2 29.Dt KILLALL 1 30.Sh NAME 31.Nm killall 32.Nd kill processes by name 33.Sh SYNOPSIS 34.Nm killall 35.Op Fl d \&| Ns Fl v 36.Op Fl h \&| Ns Fl \&? 37.Op Fl help 38.Op Fl l 39.Op Fl m 40.Op Fl s 41.Op Fl SIGNAL 42.Ar procname ... 43.Sh DESCRIPTION 44.Nm Killall 45kills processes selected by name, as opposed to the selection by pid 46as done by 47.Xr kill 1 . 48By default, it will send a 49.Dv TERM 50signal to all processes with an effective UID identical to the 51caller of 52.Nm 53that match the name 54.Ar procname . 55The super-user is allowed to kill any process. 56.Pp 57The options are as follows: 58.Bl -tag -width 10n -offset indent 59.It Fl d \&| Ns Fl v 60Be more verbose about what will be done. For a single 61.Fl d 62option, a list of the processes that will be sent the signal will be 63printed, or a message indicating that no matching processes have been 64found. If the option 65.Fl d 66has been specified at least twice, the effective UID, PID, and name 67of all processes found in 68.Xr procfs 5 69will be listed in addition. 70.It Fl h \&| Ns Fl \&? 71.It Fl help 72Give a help on the command usage and exit. 73.It Fl l 74List the names of the available signals and exit, like in 75.Xr kill 1 . 76.It Fl m 77Match the argument 78.Ar procname 79as a (case insensitive) regular expression against the names 80of processes found in 81.Xr procfs 5 . 82CAUTION! This is dangerous, a single dot will match any process 83running under the effective UID of the caller. The regular expression 84syntax in effect is that used by 85.Xr perl 1 . 86.It Fl s 87Show only what would be done, but do not send any signal. 88.It Fl SIGNAL 89Send a different signal instead of the default 90.Dv TERM . 91The signal may be specified either as a name 92.Pq with \&or without a leading Dv SIG , 93or numerically. 94.El 95 96.Sh ALL PROCESSES 97Sending a signal to all processes with uid 98.Nm XYZ 99is already supported by 100.Xr kill 1 . 101So use 102.Xr kill 1 103for this job (e.g. $ kill -TERM -1 or 104as root $ echo kill -TERM -1 | su -m <user>) 105 106 107.Sh DIAGNOSTICS 108The 109.Nm 110command will respond with a short usage message and exit with a status 111of 2 in case of a command error. A status of 1 will be returned if 112either no matching process has been found or not all processes have 113been signalled successfully. Otherwise, a status of 0 will be 114returned. 115.Pp 116Diagnostic messages will only be printed if requested by 117.Fl d 118options. 119.Sh SEE ALSO 120.Xr kill 1 , 121.Xr procfs 5 122.Sh HISTORY 123The 124.Nm 125command appeared in 126.Fx 2.1 . 127It has been modeled after the 128.Nm 129command as available on other platforms. 130.Sh AUTHORS 131The program has been contributed by 132.An Wolfram Schneider , 133this manual page has been written by 134.if n Joerg Wunsch. 135.if t J\(:org Wunsch. 136