Home Explore Blog CI



man-pages

6th chunk of `ps.man`
88735efaa8e962a6026b0e3ea274f5f89c78cb08de687f1f0000000100000fac
 columns  named  "X"  and  "Y".   Use  multiple -o options when in
              doubt.  Use the  PS_FORMAT  environment  variable  to  specify  a
              default  as  desired;  DefSysV  and DefBSD are macros that may be
              used to choose the default UNIX or BSD columns.

       -P     Add a column showing psr.

       s      Display signal format.

       u      Display user-oriented format.

       v      Display virtual memory format.

       X      Register format.

       -y     Do not show flags; show rss in place of addr.   This  option  can
              only be used with -l.

       Z      Add a column of security data.  Identical to -M (for SELinux).

OUTPUT MODIFIERS
       c      Show the true command name.  This is derived from the name of the
              executable  file,  rather  than  from  the  argv  value.  Command
              arguments and any modifications to them are thus not shown.  This
              option effectively turns the args format keyword  into  the  comm
              format  keyword;  it is useful with the -f format option and with
              the various BSD-style format options, which all normally  display
              the  command  arguments.   See  the -f option, the format keyword
              args, and the format keyword comm.

       --cols n
              Set screen width.

       --columns n
              Set screen width.

       --cumulative
              Include some dead child process data (as a sum with the parent).

       -D format
              Set the date format of the lstart field to format. This format is
              parsed by strftime(3) and should be a maximum of 24 characters to
              not mis‐align columns.

       --date‐format format
              Identical to -D.

       e      Show the environment after the command.

       f      ASCII art process hierarchy (forest).

       --forest
              ASCII art process tree.

       h      No header.  (or, one header per screen in the  BSD  personality).
              The h option is problematic.  Standard BSD ps uses this option to
              print  a  header  on each page of output, but older Linux ps uses
              this option to totally disable the header.  This  version  of  ps
              follows the Linux usage of not printing the header unless the BSD
              personality  has  been selected, in which case it prints a header
              on each page of output.  Regardless of the  current  personality,
              you can use the long options --headers and --no-headers to enable
              printing   headers   each   page  or  disable  headers  entirely,
              respectively.

       -H     Show process hierarchy (forest).

       --headers
              Repeat header lines, one per page of output.

       k spec Specify     sorting      order.       Sorting      syntax      is
              [+|-]key[,[+|-]key[,...]].   Choose  a  multi-letter key from the
              STANDARD FORMAT SPECIFIERS section.  The "+"  is  optional  since
              default direction is increasing numerical or lexicographic order.
              Identical to --sort.

                      Examples:
                      ps jaxkuid,-ppid,+pid
                      ps axk comm o comm,args
                      ps kstart_time -ef

       --lines n
              Set screen height.

       n      Numeric output for WCHAN and USER (including all types of UID and
              GID).

       --no-headers
              Print  no  header line at all.  --no-heading is an alias for this
              option.

       O order
              Sorting order (overloaded).  The BSD O option  can  act  like  -O
              (user-defined  output  format with some common fields predefined)
              or can be used to specify sort order.   Heuristics  are  used  to
              determine  the  behavior  of  this  option.   To  ensure that the
              desired behavior is obtained (sorting

Title: ps - Output Modifiers, Sorting, and Header Control
Summary
This section describes various output modifiers for the `ps` command, including showing the true command name (`c`), setting screen width (`--cols`, `--columns`), cumulative data (`--cumulative`), date format (`-D`, `--date-format`), environment (`e`), process hierarchy (`f`, `--forest`, `-H`), and controlling headers (`h`, `--headers`, `--no-headers`). It also details how to specify sorting order (`k`, `O`).