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

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man1/pgrep.1
          +++ new/usr/src/man/man1/pgrep.1
   1    1  '\" te
   2    2  .\"  Copyright (c) 2004, Sun Microsystems, Inc.  All Rights Reserved
   3    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    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    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"
        6 +.TH PGREP 1 "Jan 17, 2014"
   7    7  .SH NAME
   8    8  pgrep, pkill \- find or signal processes by name and other attributes
   9    9  .SH SYNOPSIS
  10   10  .LP
  11   11  .nf
  12   12  \fBpgrep\fR [\fB-flvx\fR] [\fB-n\fR | \fB-o\fR] [\fB-d\fR \fIdelim\fR] [\fB-P\fR \fIppidlist\fR]
  13   13       [\fB-g\fR \fIpgrplist\fR] [\fB-s\fR \fIsidlist\fR] [\fB-u\fR \fIeuidlist\fR] [\fB-U\fR \fIuidlist\fR]
  14   14       [\fB-G\fR \fIgidlist\fR] [\fB-J\fR \fIprojidlist\fR] [\fB-t\fR \fItermlist\fR]
  15   15       [\fB-T\fR \fItaskidlist\fR] [\fB-c\fR \fIctidlist\fR] [\fB-z\fR \fIzoneidlist\fR]
  16   16       [\fIpattern\fR]
↓ open down ↓ 232 lines elided ↑ open up ↑
 249  249  Reverses the sense of the matching. Matches all processes \fBexcept\fR those
 250  250  which meet the specified matching criteria.
 251  251  .RE
 252  252  
 253  253  .sp
 254  254  .ne 2
 255  255  .na
 256  256  \fB\fB-x\fR\fR
 257  257  .ad
 258  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.
      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 +
 263  281  .RE
 264  282  
 265  283  .sp
 266  284  .ne 2
 267  285  .na
 268  286  \fB\fB-z\fR \fIzoneidlist\fR\fR
 269  287  .ad
 270  288  .RS 17n
 271  289  Matches only processes whose zone \fBID\fR is in the given list. Each zone
 272  290  \fBID\fR may be specified as either a zone name or a numerical zone \fBID\fR.
↓ open down ↓ 141 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX