-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkillall.1.html
168 lines (168 loc) · 8.29 KB
/
killall.1.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<!DOCTYPE html>
<html>
<!-- This is an automatically generated file. Do not edit.
Copyright 1993-2002 Werner Almesberger
2002-2023 Craig Small
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-->
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="mandoc.css" type="text/css" media="all"/>
<title>KILLALL(1)</title>
</head>
<body>
<table class="head">
<tr>
<td class="head-ltitle">KILLALL(1)</td>
<td class="head-vol">User Commands</td>
<td class="head-rtitle">KILLALL(1)</td>
</tr>
</table>
<div class="manual-text">
<section class="Sh">
<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
<p class="Pp">killall - kill processes by name</p>
</section>
<section class="Sh">
<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
<p class="Pp"><b>killall</b> [<b>-Z</b>,<b> --context</b> <i>pattern</i>]
[<b>-e</b>,<b> --exact</b>]
[<b>-g</b>,<b> --process-group</b>]
[<b>-i</b>,<b> --interactive</b>] [<b>-n</b>,<b> --ns</b>
<i>PID</i>] [<b>-o</b>,<b> --older-than</b> <i>TIME</i>]
[<b>-q</b>,<b> --quiet</b>] [<b>-r</b>,<b> --regexp</b>]
[<b>-s</b>,<b> --signal</b>
<i>SIGNAL</i>, <b>-</b><i><b></b><i>SIGNAL</i></i>]
[<b>-u</b>,<b> --user</b> <i>user</i>]
[<b>-v</b>,<b> --verbose</b>] [<b>-w</b>,<b> --wait</b>]
[<b>-y</b>,<b> --younger-than</b> <i>TIME</i>]
[<b>-I</b>,<b> --ignore-case</b>]
[<b>-V</b>,<b> --version</b>] [<b>--</b>] <i>name</i> ...
<br/>
<b>killall</b> <b>-l</b>, <b>--list</b>
<br/>
<b>killall</b> <b>-V</b>,<b> --version</b></p>
</section>
<section class="Sh">
<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
<p class="Pp"><b>killall</b> sends a signal to all processes running any of the
specified commands. If no signal name is specified, SIGTERM is sent.</p>
<p class="Pp">Signals can be specified either by name (e.g. <b>-HUP</b> or
<b>-SIGHUP</b>) or by number (e.g. <b>-1</b>) or by option <b>-s</b>.</p>
<p class="Pp">If the command name is not regular expression (option <b>-r</b>)
and contains a slash (<b>/</b>), processes executing that particular file
will be selected for killing, independent of their name.</p>
<p class="Pp"><b>killall</b> returns a zero return code if at least one process
has been killed for each listed command, or no commands were listed and at
least one process matched the <b>-u</b> and <b>-Z</b> search criteria.
<b>killall</b> returns non-zero otherwise.</p>
<p class="Pp">A <b>killall</b> process never kills itself (but may kill other
<b>killall</b> processes).</p>
</section>
<section class="Sh">
<h1 class="Sh" id="OPTIONS"><a class="permalink" href="#OPTIONS">OPTIONS</a></h1>
<dl class="Bl-tag">
<dt id="e"><a class="permalink" href="#e"><b>-e</b>, <b>--exact</b></a></dt>
<dd>Require an exact match for very long names. If a command name is longer
than 15 characters, the full name may be unavailable (i.e. it is swapped
out). In this case, <b>killall</b> will kill everything that matches
within the first 15 characters. With <b>-e</b>, such entries are skipped.
<b>killall</b> prints a message for each skipped entry if <b>-v</b> is
specified in addition to <b>-e</b>.</dd>
<dt id="I"><a class="permalink" href="#I"><b>-I</b>,
<b>--ignore-case</b></a></dt>
<dd>Do case insensitive process name match.</dd>
<dt id="g"><a class="permalink" href="#g"><b>-g</b>,
<b>--process-group</b></a></dt>
<dd>Kill the process group to which the process belongs. The kill signal is
only sent once per group, even if multiple processes belonging to the same
process group were found.</dd>
<dt id="i"><a class="permalink" href="#i"><b>-i</b>,
<b>--interactive</b></a></dt>
<dd>Interactively ask for confirmation before killing.</dd>
<dt id="l"><a class="permalink" href="#l"><b>-l</b>, <b>--list</b></a></dt>
<dd>List all known signal names.</dd>
<dt id="n"><a class="permalink" href="#n"><b>-n</b>, <b>--ns</b></a></dt>
<dd>Match against the PID namespace of the given PID. The default is to match
against all namespaces.</dd>
<dt id="o"><a class="permalink" href="#o"><b>-o</b>,
<b>--older-than</b></a></dt>
<dd>Match only processes that are older (started before) the time specified.
The time is specified as a float then a unit. The units are s,m,h,d,w,M,y
for seconds, minutes, hours, days, weeks, months and years
respectively.</dd>
<dt id="q"><a class="permalink" href="#q"><b>-q</b>, <b>--quiet</b></a></dt>
<dd>Do not complain if no processes were killed.</dd>
<dt id="r"><a class="permalink" href="#r"><b>-r</b>, <b>--regexp</b></a></dt>
<dd>Interpret process name pattern as a POSIX extended regular expression, per
<b>regex</b>(3).</dd>
<dt id="s"><a class="permalink" href="#s"><b>-s</b>, <b>--signal</b>,
<b>-</b><i>SIGNAL</i><b></b></a></dt>
<dd>Send this signal instead of SIGTERM.</dd>
<dt id="u"><a class="permalink" href="#u"><b>-u</b>, <b>--user</b></a></dt>
<dd>Kill only processes the specified user owns. Command names are
optional.</dd>
<dt id="v"><a class="permalink" href="#v"><b>-v</b>, <b>--verbose</b></a></dt>
<dd>Report if the signal was successfully sent.</dd>
<dt id="V"><a class="permalink" href="#V"><b>-V</b>, <b>--version</b></a></dt>
<dd>Display version information.</dd>
<dt id="w"><a class="permalink" href="#w"><b>-w</b>, <b>--wait</b></a></dt>
<dd>Wait for all killed processes to die. <b>killall</b> checks once per
second if any of the killed processes still exist and only returns if none
are left. Note that <b>killall</b> may wait forever if the signal was
ignored, had no effect, or if the process stays in zombie state.</dd>
<dt id="y"><a class="permalink" href="#y"><b>-y</b>,
<b>--younger-than</b></a></dt>
<dd>Match only processes that are younger (started after) the time specified.
The time is specified as a float then a unit. The units are s,m,h,d,w,M,y
for seconds, minutes, hours, days, weeks, Months and years
respectively.</dd>
<dt id="Z"><a class="permalink" href="#Z"><b>-Z</b>, <b>--context</b></a></dt>
<dd>Specify security context: kill only processes having security context that
match with given extended regular expression pattern. Must precede other
arguments on the command line. Command names are optional.</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h1>
<dl class="Bl-tag">
<dt>/proc</dt>
<dd>location of the proc file system</dd>
</dl>
</section>
<section class="Sh">
<h1 class="Sh" id="KNOWN_BUGS"><a class="permalink" href="#KNOWN_BUGS">KNOWN
BUGS</a></h1>
<p class="Pp">Killing by file only works for executables that are kept open
during execution, i.e. impure executables can't be killed this way.</p>
<p class="Pp">Be warned that typing <b>killall</b> <i>name</i> may not have the
desired effect on non-Linux systems, especially when done by a privileged
user.</p>
<p class="Pp"><b>killall -w</b> doesn't detect if a process disappears and is
replaced by a new process with the same PID between scans.</p>
<p class="Pp">If processes change their name, <b>killall</b> may not be able to
match them correctly.</p>
<p class="Pp"><b>killall</b> has a limit of names that can be specified on the
command line. This figure is the size of an unsigned long integer multiplied
by 8. For most 32 bit systems the limit is 32 and similarly for a 64 bit
system the limit is usually 64.</p>
</section>
<section class="Sh">
<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
ALSO</a></h1>
<p class="Pp"><b>kill</b>(1), <b>fuser</b>(1), <b>pgrep</b>(1), <b>pidof</b>(1),
<b>pkill</b>(1), <b>ps</b>(1), <b>kill</b>(2), <b>regex</b>(3).</p>
</section>
</div>
<table class="foot">
<tr>
<td class="foot-date">2023-06-17</td>
<td class="foot-os">psmisc</td>
</tr>
</table>
</body>
</html>