Print this page
3563 pgrep not working as documented or documentation inaccurate

*** 1,11 **** '\" te .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved .\" 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. .\" 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. .\" 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] ! .TH PGREP 1 "May 6, 2004" .SH NAME pgrep, pkill \- find or signal processes by name and other attributes .SH SYNOPSIS .LP .nf --- 1,11 ---- '\" te .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved .\" 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. .\" 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. .\" 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] ! .TH PGREP 1 "Jan 17, 2014" .SH NAME pgrep, pkill \- find or signal processes by name and other attributes .SH SYNOPSIS .LP .nf
*** 254,267 **** .ne 2 .na \fB\fB-x\fR\fR .ad .RS 17n ! Considers only processes whose argument string or executable file name ! \fBexactly\fR matches the specified \fIpattern\fR to be matching processes. The ! pattern match is considered to be exact when all characters in the process ! argument string or executable file name match the pattern. .RE .sp .ne 2 .na --- 254,285 ---- .ne 2 .na \fB\fB-x\fR\fR .ad .RS 17n ! Matches only processes whose executable file name (ignoring any path) ! \fBexactly\fR matches the specified \fIpattern\fR. However, when used with -f, ! the \fIpattern\fR should be matched against the full process argument ! string. For example if there exists a process `/bin/ls /home' then: ! .sp ! .in +2 ! .nf ! $ pgrep -x ls ! 1780 ! $ pgrep -x -f '/bin/ls /home' ! 1780 ! $ pgrep -x -f '/bin/ls.*' ! 1780 ! $ pgrep -x /bin/ls ! $ pgrep -x -f 'ls /home' ! $ pgrep -x -f /bin/ls ! $ ! ! .fi ! .in -2 ! .sp ! .RE .sp .ne 2 .na