1 .\" $NetBSD: pkill.1,v 1.8 2003/02/14 15:59:18 grant Exp $
2 .\" $DragonFly: src/usr.bin/pkill/pkill.1,v 1.6 2007/05/17 08:19:02 swildner Exp $
4 .\" Copyright (c) 2002 The NetBSD Foundation, Inc.
5 .\" All rights reserved.
7 .\" This code is derived from software contributed to The NetBSD Foundation
10 .\" Redistribution and use in source and binary forms, with or without
11 .\" modification, are permitted provided that the following conditions
13 .\" 1. Redistributions of source code must retain the above copyright
14 .\" notice, this list of conditions and the following disclaimer.
15 .\" 2. Redistributions in binary form must reproduce the above copyright
16 .\" notice, this list of conditions and the following disclaimer in the
17 .\" documentation and/or other materials provided with the distribution.
18 .\" 3. All advertising materials mentioning features or use of this software
19 .\" must display the following acknowledgement:
20 .\" This product includes software developed by the NetBSD
21 .\" Foundation, Inc. and its contributors.
22 .\" 4. Neither the name of The NetBSD Foundation nor the names of its
23 .\" contributors may be used to endorse or promote products derived
24 .\" from this software without specific prior written permission.
26 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 .\" POSSIBILITY OF SUCH DAMAGE.
44 .Nd find or signal processes by name
73 command searches the process table on the running system and prints the
74 process IDs of all processes that match the criteria given on the command
79 command searches the process table on the running system and signals all
80 processes that match the criteria given on the command line.
82 The following options are available:
83 .Bl -tag -width xxxxxxxx
85 Restrict matches to processes with a real group ID in the comma-separated
89 Restrict matches to processes with a parent process ID in the
93 Restrict matches to processes with a real user ID in the comma-separated
97 Specify a delimiter to be printed between each process ID.
98 The default is a newline.
99 This option can only be used with the
103 Match against full argument lists.
104 The default is to match against process names.
106 Restrict matches to processes with a process group ID in the comma-separated
109 The value zero is taken to mean the process group ID of the running
115 Restrict matches to processes inside jails with a jail ID in the comma-separated
120 matches processes in any jail.
123 matches processes not in a jail.
126 Print the process name in addition to the process ID for each matching
128 If used in conjunction with
130 print the process ID and the full argument list for each matching process.
131 This option can only be used with the
135 Match only the most recently created process, if any.
137 Restrict matches to processes with a session ID in the comma-separated
140 The value zero is taken to mean the session ID of the running
146 Restrict matches to processes associated with a terminal in the
149 Terminal names may be of the form
151 or the shortened form
153 A single dash (`-') matches processes not associated with a terminal.
155 Restrict matches to processes with an effective user ID in the
159 Reverse the sense of the matching; display processes that do not match the
162 Require an exact match of the process name, or argument list if
165 The default is to match any substring.
167 A non-negative decimal number or symbolic signal name specifying the signal
168 to be sent instead of the default TERM.
169 This option is valid only when given as the first argument to
177 process will never consider itself nor system processes (kernel threads) as
183 return one of the following values upon exit:
186 One or more processes were matched.
188 No processes were matched.
190 Invalid options were specified on the command line.
192 An internal error occurred.
207 They are modeled after utilities of the same name that appeared in Sun
209 They first appeared in