1 .\" $NetBSD: pkill.1,v 1.8 2003/02/14 15:59:18 grant Exp $
3 .\" $FreeBSD: src/bin/pkill/pkill.1,v 1.8 2010/07/12 01:58:46 brian Exp $
5 .\" Copyright (c) 2002 The NetBSD Foundation, Inc.
6 .\" All rights reserved.
8 .\" This code is derived from software contributed to The NetBSD Foundation
11 .\" Redistribution and use in source and binary forms, with or without
12 .\" modification, are permitted provided that the following conditions
14 .\" 1. Redistributions of source code must retain the above copyright
15 .\" notice, this list of conditions and the following disclaimer.
16 .\" 2. Redistributions in binary form must reproduce the above copyright
17 .\" notice, this list of conditions and the following disclaimer in the
18 .\" documentation and/or other materials provided with the distribution.
20 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
21 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 .\" POSSIBILITY OF SUCH DAMAGE.
37 .Nd find or signal processes by name
64 command searches the process table on the running system and prints the
65 process IDs of all processes that match the criteria given on the command
70 command searches the process table on the running system and signals all
71 processes that match the criteria given on the command line.
73 The following options are available:
74 .Bl -tag -width ".Fl F Ar pidfile"
76 Restrict matches to a process whose PID is stored in the
80 Restrict matches to processes with a real group ID in the comma-separated
84 Request confirmation before attempting to signal each process.
90 option must be locked with the
92 syscall or created with
95 Restrict matches to processes with a parent process ID in the
99 Restrict matches to processes with a real user ID in the comma-separated
103 Specify a delimiter to be printed between each process ID.
104 The default is a newline.
105 This option can only be used with the
109 Include process ancestors in the match list.
110 By default, the current
114 process and all of its ancestors are excluded (unless
118 Match against full argument lists.
119 The default is to match against process names.
121 Restrict matches to processes with a process group ID in the comma-separated
124 The value zero is taken to mean the process group ID of the running
130 Ignore case distinctions in both the process table and the supplied pattern.
135 print the process name in addition to the process ID for each matching
137 If used in conjunction with
139 print the process ID and the full argument list for each matching process.
142 display the kill command used for each process killed.
144 Select only the newest (most recently started) of the matching processes.
146 Select only the oldest (least recently started) of the matching processes.
148 Do not write anything to standard output.
150 Restrict matches to processes associated with a terminal in the
153 Terminal names may be of the form
155 or the shortened form
159 matches processes not associated with a terminal.
161 Restrict matches to processes with an effective user ID in the
165 Reverse the sense of the matching; display processes that do not match the
168 Require an exact match of the process name, or argument list if
171 The default is to match any substring.
173 A non-negative decimal number or symbolic signal name specifying the signal
174 to be sent instead of the default
176 This option is valid only when given as the first argument to
182 operands are specified, they are used as regular expressions to match
183 the command name or full argument list of each process.
189 process will never consider itself as
197 return one of the following values upon exit:
198 .Bl -tag -width indent
200 One or more processes were matched.
202 No processes were matched.
204 Invalid options were specified on the command line.
206 An internal error occurred.
226 They are modelled after utilities of the same name that appeared in Sun
228 They made their first appearance in