Home Explore Blog CI



man-pages

2nd chunk of `pkill.man`
73997195f5f3f15ba078ff1ec9806a366a81927a3e0b03ac0000000100000a8f
 matching
              processes.

       -o, --oldest
              Select only the oldest (least recently started) of  the  matching
              processes.

       -O, --older secs
              Select processes older than secs.

       -P, --parent ppid,...
              Only match processes whose parent process ID is listed.

       -s, --session sid,...
              Only match processes whose process session ID is listed.  Session
              ID  0  is translated into pgrep’s, pkill’s, or pidwait’s own ses‐
              sion ID.

       -t, --terminal term,...
              Only match processes whose controlling terminal is  listed.   The
              terminal name should be specified without the "/dev/" prefix.

       -u, --euid euid,...
              Only  match  processes whose effective user ID is listed.  Either
              the numerical or symbolical value may be used.

       -U, --uid uid,...
              Only match processes whose real user ID is  listed.   Either  the
              numerical or symbolical value may be used.

       -v, --inverse
              Negates  the matching.  This option is usually used in pgrep’s or
              pidwait’s context.  In pkill’s context the short option  is  dis‐
              abled to avoid accidental usage of the option.

       -w, --lightweight
              Shows all thread ids instead of pids in pgrep’s or pidwait’s con‐
              text.  In pkill’s context this option is disabled.

       -x, --exact
              Only match processes whose names (or command lines if -f is spec‐
              ified) exactly match the pattern.

       -F, --pidfile file
              Read  PIDs  from  file.   This option is more useful for pkill or
              pidwait than pgrep.

       -L, --logpidfile
              Fail if pidfile (see -F) not locked.

       -r, --runstates D,R,S,Z,...
              Match only processes which match the process state.

       -A, --ignore‐ancestors
              Ignore all ancestors of pgrep, pkill, or pidwait.   For  example,
              this can be useful when elevating with sudo or similar tools.

       -H, --require-handler
              Only  match processes with a userspace signal handler present for
              the signal to be sent.

       --cgroup name,...
              Match on provided control group (cgroup) v2 name. See cgroups(8)

       --ns pid
              Match processes that belong to the same namespaces.  Required  to
              run as root to match processes from other users. See --nslist for
              how to limit which namespaces to match.

       --nslist name,...
              Match  only  the 

Title: pgrep, pkill, pidwait Options (Continued)
Summary
This section continues to describe the options available for pgrep, pkill, and pidwait. These options allow filtering processes based on real user ID, process state, exact name matching, process ID file, control group, and namespaces. It also covers options for inverting the match, displaying thread IDs, ignoring ancestors, and requiring a userspace signal handler. These options provide fine-grained control over process selection for signaling, waiting, or identification.