OS Manuals

/usr/bin/pr

Cross-platform Rust rewrite of the GNU coreutils.

From uutils 0.12.0-r6 (os), captured 2026-11-07 by running pr --help (exit 0). permalink

paginate or columnate FILE(s) for printing

Usage: pr [OPTION]... [FILE]...

Arguments:
  [files]...  [default: -]

Options:
      --pages <FIRST_PAGE[:LAST_PAGE]>  Begin and stop printing with page FIRST_PAGE[:LAST_PAGE]
  -h, --header <STRING>                 Use the string header to replace the file name
                                                        in the header line.
  -D, --date-format <FORMAT>            Use 'date'-style FORMAT for the header date.
  -d, --double-space                    Produce output that is double spaced. An extra `<newline>`
                                                        character is output following every
                                                        `<newline>` found in the input.
  -n, --number-lines [<[char][width]>]  Provide width digit line numbering.  The default for width,
                                                        if not specified, is 5.  The number occupies
                                                        the first width column
                                                        positions of each text column or each line
                                                        of -m output.  If char
                                                        (any non-digit character) is given, it is
                                                        appended to the line number
                                                        to separate it from whatever follows.  The
                                                        default for char is a `<tab>`.
                                                        Line numbers longer than width columns are
                                                        truncated.
  -N, --first-line-number <NUMBER>      start counting with NUMBER at 1st line of first page printed
  -t, --omit-header                     Write neither the five-line identifying header nor the
                                        five-line
                                                        trailer usually supplied for each page. Quit
                                                        writing after the last line
                                                         of each file without spacing to the end of
                                                         the page.
  -T, --omit-pagination                 omit page headers and trailers, eliminate any pagination
                                                        by form feeds set in input files
  -l, --length <PAGE_LENGTH>            Override the 66-line default (default number of lines of
                                        text 56,
                                                        and with -F 63) and reset the page length to
                                                        lines.  If lines is not
                                                        greater than the sum  of  both the  header
                                                        and trailer depths (in lines),
                                                        the pr utility shall suppress both the
                                                        header and trailer, as if the -t
                                                        option were in effect.
  -r, --no-file-warnings                omit warning when a file cannot be opened
  -F, --form-feed                       Use a `<form-feed>` for new pages, instead of the default
                                        behavior that
                                                        uses a sequence of `<newline>`s. [alias: -f]
  -w, --width <width>                   Set the width of the line to width column positions for
                                        multiple
                                                        text-column output only. If the -w option is
                                                        not specified and the -s option
                                                        is not specified, the default width shall be
                                                        72. If the -w option is not specified
                                                        and the -s option is specified, the default
                                                        width shall be 512.
  -W, --page-width <width>              set page width to PAGE_WIDTH (72) characters always,
                                                        truncate lines, except -J option is set, no
                                                        interference
                                                        with -S or -s
  -a, --across                          Modify the effect of the - column option so that the columns
                                        are filled
                                                        across the page in a  round-robin  order
                                                        (for example, when column is 2, the
                                                        first input line heads column 1, the second
                                                        heads column 2, the third is the
                                                        second line in column 1, and so on).
      --columns <columns>               Produce multi-column output that is arranged in column
                                        columns
                                                        (the default shall be 1) and is written down
                                                        each column  in  the order in which
                                                        the text is received from the input file.
                                                        This option should not be used with -m.
                                                        The options -e and -i shall be assumed for
                                                        multiple text-column output.  Whether
                                                        or not text columns are produced with
                                                        identical vertical lengths is unspecified,
                                                        but a text column shall never exceed the
                                                        length of the page (see the -l option).
                                                        When used with -t, use the minimum number of
                                                        lines to write the output.
  -s, --separator [<char>]              Separate text columns by the single character char instead
                                        of by the
                                                        appropriate number of `<space>`s (default
                                                        for char is the `<tab>` character).
  -S, --sep-string [<string>]           separate columns by STRING,
                                                        without -S: Default separator `<TAB>` with
                                                        -J and `<space>`
                                                        otherwise (same as -S\" \"), no effect on
                                                        column options
  -m, --merge                           Merge files. Standard output shall be formatted so the pr
                                        utility
                                                        writes one line from each file specified by
                                                        a file operand, side by side
                                                        into text columns of equal fixed widths, in
                                                        terms of the number of column
                                                        positions. Implementations shall support
                                                        merging of at least nine file operands.
  -o, --indent <margin>                 Each line of output shall be preceded by offset `<space>`s.
                                        If the -o
                                                        option is not specified, the default offset
                                                        shall be zero. The space taken is
                                                        in addition to the output line width (see
                                                        the -w option below).
  -J, --join-lines                      merge full lines, turns off -W line truncation, no column
                                                        alignment, --sep-string[=STRING] sets
                                                        separators
      --help                            Print help information
  -e, --expand-tabs <[CHAR][WIDTH]>     expand input CHARs (TABs) to tab WIDTH (8)
  -V, --version                         Print version

If no FILE(s) are given, or if FILE is -, read standard input.

When creating multicolumn output, columns will be of equal width. When using
the '-s' option to separate columns, the default separator is a single tab
character. When using the '-S' option to separate columns, the default separator
is a single space character.
Options (23)
OptionDescriptionSource
--pages FIRST_PAGE[:LAST_PAGEBegin and stop printing with page FIRST_PAGE[:LAST_PAGE]help
-h, --header STRINGUse the string header to replace the file name in the header line.help + man
-D, --date-format FORMATUse 'date'-style FORMAT for the header date.help + man
-d, --double-spaceProduce output that is double spaced.help + man
-n, --number-lines char][widthProvide width digit line numbering.help
-N, --first-line-number NUMBERstart counting with NUMBER at 1st line of first page printedhelp + man
-t, --omit-headerWrite neither the five-line identifying header nor the five-line trailer usually supplied for each page.help + man
-T, --omit-paginationomit page headers and trailers, eliminate any pagination by form feeds set in input fileshelp + man
-l, --length PAGE_LENGTHOverride the 66-line default (default number of lines of text 56, and with -F 63) and reset the page length to lines.help + man
-r, --no-file-warningsomit warning when a file cannot be openedhelp + man
-F, --form-feedUse a `<form-feed>` for new pages, instead of the default behavior that uses a sequence of `<newline>`s.help + man
-w, --width widthSet the width of the line to width column positions for multiple text-column output only.help + man
-W, --page-width widthset page width to PAGE_WIDTH (72) characters always, truncate lines, except -J option is set, no interference with -S or -shelp + man
-a, --acrossModify the effect of the - column option so that the columns are filled across the page in a round-robin order (for example, when column is 2, the first input line heads column 1, the second heads…help + man
--columns columnsProduce multi-column output that is arranged in column columns (the default shall be 1) and is written down each column in the order in which the text is received from the input file.help + man
-s, --separator charSeparate text columns by the single character char instead of by the appropriate number of `<space>`s (default for char is the `<tab>` character).help
-S, --sep-string stringseparate columns by STRING, without -S: Default separator `<TAB>` withhelp
-m, --mergeMerge files.help + man
-o, --indent marginEach line of output shall be preceded by offset `<space>`s.help + man
-J, --join-linesmerge full lines, turns off -W line truncation, no column alignment, --sep-string[=STRING] sets separatorshelp + man
--helpPrint help informationhelp + man
-e, --expand-tabs CHAR][WIDTHexpand input CHARs (TABs) to tab WIDTH (8)help
-V, --versionPrint versionhelp + man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.