]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/killall/killall.1
Sorted the lists.
[FreeBSD/FreeBSD.git] / usr.bin / killall / killall.1
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
29 .Dt KILLALL 1
30 .Sh NAME
31 .Nm killall
32 .Nd kill processes by name
33 .Sh SYNOPSIS
34 .Nm
35 .Op Fl d | v
36 .Op Fl h | ?\&
37 .Op Fl help
38 .Op Fl l
39 .Op Fl m
40 .Op Fl s
41 .Op Fl u Ar user
42 .Op Fl t Ar tty
43 .Op Fl c Ar procname
44 .Op Fl SIGNAL
45 .Op Ar procname ...
46 .Sh DESCRIPTION
47 .Nm Killall
48 kills processes selected by name, as opposed to the selection by pid
49 as done by
50 .Xr kill 1 .
51 By default, it will send a
52 .Dv TERM
53 signal to all processes with a real UID identical to the
54 caller of
55 .Nm
56 that match the name
57 .Ar procname .
58 The super-user is allowed to kill any process.
59 .Pp
60 The options are as follows:
61 .Bl -tag -width 10n -offset indent
62 .It Fl d | v
63 Be more verbose about what will be done.  For a single
64 .Fl d
65 option, a list of the processes that will be sent the signal will be
66 printed, or a message indicating that no matching processes have been
67 found.
68 .It Fl h | ?\&
69 .It Fl help
70 Give a help on the command usage and exit.
71 .It Fl l
72 List the names of the available signals and exit, like in
73 .Xr kill 1 .
74 .It Fl m
75 Match the argument
76 .Ar procname
77 as a (case insensitive) regular expression against the names
78 of processes found.
79 CAUTION!  This is dangerous, a single dot will match any process
80 running under the real UID of the caller.
81 .It Fl s
82 Show only what would be done, but do not send any signal.
83 .It Fl SIGNAL
84 Send a different signal instead of the default
85 .Dv TERM .
86 The signal may be specified either as a name
87 (with or without a leading
88 .Dv SIG ) ,
89 or numerically.
90 .It Fl u Ar user
91 Limit potentially matching processes to those belonging to
92 the specified
93 .Ar user .
94 .It Fl t Ar tty
95 Limit potentially matching processes to those running on
96 the specified
97 .Ar tty .
98 .It Fl c Ar procname
99 When used with the
100 .Fl u
101 or
102 .Fl t
103 flags, limit potentially matching processes to those matching
104 the specified
105 .Ar progname .
106 .El
107 .Sh ALL PROCESSES
108 Sending a signal to all processes with uid
109 .Nm XYZ
110 is already supported by
111 .Xr kill 1 .
112 So use
113 .Xr kill 1
114 for this job (e.g. $ kill -TERM -1 or
115 as root $ echo kill -TERM -1 | su -m <user>)
116 .Sh DIAGNOSTICS
117 The
118 .Nm
119 command will respond with a short usage message and exit with a status
120 of 2 in case of a command error.  A status of 1 will be returned if
121 either no matching process has been found or not all processes have
122 been signalled successfully.  Otherwise, a status of 0 will be
123 returned.
124 .Pp
125 Diagnostic messages will only be printed if requested by
126 .Fl d
127 options.
128 .Sh SEE ALSO
129 .Xr kill 1 ,
130 .Xr sysctl 3
131 .Sh HISTORY
132 The
133 .Nm
134 command appeared in
135 .Fx 2.1 .
136 It has been modeled after the
137 .Nm
138 command as available on other platforms.
139 .Sh AUTHORS
140 .An -nosplit
141 The
142 .Nm
143 program was originally written in Perl and was contributed by
144 .An Wolfram Schneider ,
145 this manual page has been written by
146 .An J\(:org Wunsch .
147 The current version of
148 .Nm
149 was rewritten in C by
150 .An Peter Wemm
151 using
152 .Xr sysctl 3 .