this manner is in
addition to the set of processes selected by other means. An
alternate description is that this option causes ps to list all
processes owned by you (same EUID as ps), or to list all
processes when used together with the a option.
PROCESS SELECTION BY LIST
These options accept a single argument in the form of a blank-separated
or comma-separated list. They can be used multiple times. For example:
ps -p "1 2" -p 3,4
-123 Identical to --pid 123.
123 Identical to --pid 123.
-C cmdlist
Select by command name. This selects the processes whose
executable name is given in cmdlist. NOTE: The command name is
not the same as the command line. Previous versions of procps and
the kernel truncated this command name to 15 characters. This
limitation is no longer present in both. If you depended on
matching only 15 characters, you may no longer get a match.
-G grplist
Select by real group ID (RGID) or name. This selects the
processes whose real group name or ID is in the grplist list.
The real group ID identifies the group of the user who created
the process, see getgid(2).
-g grplist
Select by session OR by effective group name. Selection by
session is specified by many standards, but selection by
effective group is the logical behavior that several other
operating systems use. This ps will select by session when the
list is completely numeric (as sessions are). Group ID numbers
will work only when some group names are also specified. See the
-s and --group options.
--Group grplist
Select by real group ID (RGID) or name. Identical to -G.
--group grplist
Select by effective group ID (EGID) or name. This selects the
processes whose effective group name or ID is in grplist. The
effective group ID describes the group whose file access
permissions are used by the process (see getegid(2)). The -g
option is often an alternative to --group.
p pidlist
Select by process ID. Identical to -p and --pid.
-p pidlist
Select by PID. This selects the processes whose process ID
numbers appear in pidlist. Identical to p and --pid.
--pid pidlist
Select by process ID. Identical to -p and p.
--ppid pidlist
Select by parent process ID. This selects the processes with a
parent process ID in pidlist. That is, it selects processes that
are children of those listed in pidlist.
q pidlist
Select by process ID (quick mode). Identical to -q and
--quick-pid.
-q pidlist
Select by PID (quick mode). This selects the processes whose
process ID numbers appear in pidlist. With this option ps reads
the necessary info only for the pids listed in the pidlist and
doesn’t apply additional filtering rules. The order of pids is
unsorted and preserved. No additional selection options, sorting
and forest type listings are allowed in this mode. Identical to
q and --quick-pid.
--quick-pid pidlist
Select by process ID (quick mode). Identical to -q and q.
-s sesslist
Select by session ID. This selects the processes with a session
ID specified in sesslist.
--sid sesslist
Select by session ID. Identical to -s.
t ttylist