1 '\" te
2 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH PGREP 1 "May 6, 2004"
7 .SH NAME
8 pgrep, pkill \- find or signal processes by name and other attributes
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBpgrep\fR [\fB-flvx\fR] [\fB-n\fR | \fB-o\fR] [\fB-d\fR \fIdelim\fR] [\fB-P\fR \fIppidlist\fR]
13 [\fB-g\fR \fIpgrplist\fR] [\fB-s\fR \fIsidlist\fR] [\fB-u\fR \fIeuidlist\fR] [\fB-U\fR \fIuidlist\fR]
14 [\fB-G\fR \fIgidlist\fR] [\fB-J\fR \fIprojidlist\fR] [\fB-t\fR \fItermlist\fR]
15 [\fB-T\fR \fItaskidlist\fR] [\fB-c\fR \fIctidlist\fR] [\fB-z\fR \fIzoneidlist\fR]
16 [\fIpattern\fR]
17 .fi
18
19 .LP
20 .nf
21 \fBpkill\fR [\fB-\fIsignal\fR\fR] [\fB-fvx\fR] [\fB-n\fR | \fB-o\fR] [\fB-P\fR \fIppidlist\fR]
22 [\fB-g\fR \fIpgrplist\fR] [\fB-s\fR \fIsidlist\fR] [\fB-u\fR \fIeuidlist\fR] [\fB-U\fR \fIuidlist\fR]
23 [\fB-G\fR \fIgidlist\fR] [\fB-J\fR \fIprojidlist\fR] [\fB-t\fR \fItermlist\fR]
24 [\fB-T\fR \fItaskidlist\fR] [\fB-c\fR \fIctidlist\fR] [\fB-z\fR \fIzoneidlist\fR]
25 [\fIpattern\fR]
26 .fi
239 Matches only processes whose real user \fBID\fR is in the given list. Each user
240 \fBID\fR may be specified as either a login name or a numerical user \fBID\fR.
241 .RE
242
243 .sp
244 .ne 2
245 .na
246 \fB\fB-v\fR\fR
247 .ad
248 .RS 17n
249 Reverses the sense of the matching. Matches all processes \fBexcept\fR those
250 which meet the specified matching criteria.
251 .RE
252
253 .sp
254 .ne 2
255 .na
256 \fB\fB-x\fR\fR
257 .ad
258 .RS 17n
259 Considers only processes whose argument string or executable file name
260 \fBexactly\fR matches the specified \fIpattern\fR to be matching processes. The
261 pattern match is considered to be exact when all characters in the process
262 argument string or executable file name match the pattern.
263 .RE
264
265 .sp
266 .ne 2
267 .na
268 \fB\fB-z\fR \fIzoneidlist\fR\fR
269 .ad
270 .RS 17n
271 Matches only processes whose zone \fBID\fR is in the given list. Each zone
272 \fBID\fR may be specified as either a zone name or a numerical zone \fBID\fR.
273 This option is only useful when executed in the global zone. If the \fBpkill\fR
274 utility is used to send signals to processes in other zones, the process must
275 have asserted the \fB{PRIV_PROC_ZONE}\fR privilege (see \fBprivileges\fR(5)).
276 .RE
277
278 .sp
279 .ne 2
280 .na
281 \fB\fB-\fR\fIsignal\fR\fR
282 .ad
|
1 '\" te
2 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH PGREP 1 "Jan 17, 2014"
7 .SH NAME
8 pgrep, pkill \- find or signal processes by name and other attributes
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBpgrep\fR [\fB-flvx\fR] [\fB-n\fR | \fB-o\fR] [\fB-d\fR \fIdelim\fR] [\fB-P\fR \fIppidlist\fR]
13 [\fB-g\fR \fIpgrplist\fR] [\fB-s\fR \fIsidlist\fR] [\fB-u\fR \fIeuidlist\fR] [\fB-U\fR \fIuidlist\fR]
14 [\fB-G\fR \fIgidlist\fR] [\fB-J\fR \fIprojidlist\fR] [\fB-t\fR \fItermlist\fR]
15 [\fB-T\fR \fItaskidlist\fR] [\fB-c\fR \fIctidlist\fR] [\fB-z\fR \fIzoneidlist\fR]
16 [\fIpattern\fR]
17 .fi
18
19 .LP
20 .nf
21 \fBpkill\fR [\fB-\fIsignal\fR\fR] [\fB-fvx\fR] [\fB-n\fR | \fB-o\fR] [\fB-P\fR \fIppidlist\fR]
22 [\fB-g\fR \fIpgrplist\fR] [\fB-s\fR \fIsidlist\fR] [\fB-u\fR \fIeuidlist\fR] [\fB-U\fR \fIuidlist\fR]
23 [\fB-G\fR \fIgidlist\fR] [\fB-J\fR \fIprojidlist\fR] [\fB-t\fR \fItermlist\fR]
24 [\fB-T\fR \fItaskidlist\fR] [\fB-c\fR \fIctidlist\fR] [\fB-z\fR \fIzoneidlist\fR]
25 [\fIpattern\fR]
26 .fi
239 Matches only processes whose real user \fBID\fR is in the given list. Each user
240 \fBID\fR may be specified as either a login name or a numerical user \fBID\fR.
241 .RE
242
243 .sp
244 .ne 2
245 .na
246 \fB\fB-v\fR\fR
247 .ad
248 .RS 17n
249 Reverses the sense of the matching. Matches all processes \fBexcept\fR those
250 which meet the specified matching criteria.
251 .RE
252
253 .sp
254 .ne 2
255 .na
256 \fB\fB-x\fR\fR
257 .ad
258 .RS 17n
259 Matches only processes whose executable file name (ignoring any path)
260 \fBexactly\fR matches the specified \fIpattern\fR. However, when used with -f,
261 the \fIpattern\fR should be matched against the full process argument
262 string. For example if there exists a process `/bin/ls /home' then:
263 .sp
264 .in +2
265 .nf
266 $ pgrep -x ls
267 1780
268 $ pgrep -x -f '/bin/ls /home'
269 1780
270 $ pgrep -x -f '/bin/ls.*'
271 1780
272 $ pgrep -x /bin/ls
273 $ pgrep -x -f 'ls /home'
274 $ pgrep -x -f /bin/ls
275 $
276
277 .fi
278 .in -2
279 .sp
280
281 .RE
282
283 .sp
284 .ne 2
285 .na
286 \fB\fB-z\fR \fIzoneidlist\fR\fR
287 .ad
288 .RS 17n
289 Matches only processes whose zone \fBID\fR is in the given list. Each zone
290 \fBID\fR may be specified as either a zone name or a numerical zone \fBID\fR.
291 This option is only useful when executed in the global zone. If the \fBpkill\fR
292 utility is used to send signals to processes in other zones, the process must
293 have asserted the \fB{PRIV_PROC_ZONE}\fR privilege (see \fBprivileges\fR(5)).
294 .RE
295
296 .sp
297 .ne 2
298 .na
299 \fB\fB-\fR\fIsignal\fR\fR
300 .ad
|