| PKILL(1) | General Commands Manual | PKILL(1) | 
pkill, pgrep,
  prenice —
| pgrep | [ -filnqvx] [-ddelim] [-Ggid] [-gpgrp] [-Pppid] [-ssid] [-ttty] [-Uuid] [-ueuid] pattern ... | 
| pkill | [ -signal] [-filnvx]
      [-Ggid]
      [-gpgrp]
      [-Pppid]
      [-ssid]
      [-ttty]
      [-Uuid]
      [-ueuid]
      pattern ... | 
| prenice | [ -l] priority
      pattern ... | 
pgrep command searches the process table on the
  running system and prints the process IDs of all processes that match the
  criteria given on the command line.
The pkill command searches the process
    table on the running system and signals all processes that match the
    criteria given on the command line.
The prenice command searches the process
    table on the running system and sets the priority of all processes that
    match the criteria given on the command line.
By default, matching applies to any substring of the command name (argv[0]), but options may be used to change this. Patterns are specified using extended regular expressions (see re_format(7)).
The following options are available for
    pkill and pgrep:
-d
    delimpgrep command.-f-G
    gid-g
    pgrppgrep
      or pkill command.-i-l-f,
      print the process ID and the full argument list for each matching
    process.-n-P
    ppid-s
    sidpgrep or
      pkill command.-t
    tty-U
    uid-u
    euid-v-x-f is given. The default is to match any
      substring.-signalpkill.The following option is also available for
    pgrep:
-qThe -l flag is also available for
    prenice.
Note that a running pgrep,
    pkill, or prenice process
    will never consider itself or system processes (kernel threads) as a
    potential match.
pgrep, pkill, and
  prenice return one of the following values upon exit:
pkill and pgrep first appeared
  in NetBSD 1.6. They are modelled after utilities of
  the same name that appeared in Sun Solaris 7.
prenice was introduced in
    NetBSD 6.0.
| October 29, 2022 | NetBSD 10.1 |