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