OS Manuals

/usr/bin/fmt

Cross-platform Rust rewrite of the GNU coreutils.

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

Reformat paragraphs from input (or standard input) to stdout.

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

Arguments:
  [FILES]...

Options:
  -c, --crown-margin          First and second line of paragraph may have different indentations, in
                              which case the first line's indentation is preserved, and each
                              subsequent line's indentation matches the second line.
  -t, --tagged-paragraph      Like -c, except that the first and second line of a paragraph *must*
                              have different indentation or they are treated as separate paragraphs.
  -m, --preserve-headers      Attempt to detect and preserve mail headers in the input. Be careful
                              when combining this flag with -p.
  -s, --split-only            Split lines only, do not reflow.
  -u, --uniform-spacing       Insert exactly one space between words, and two between sentences.
                              Sentence breaks in the input are detected as [?!.] followed by two
                              spaces or a newline; other punctuation is not interpreted as a
                              sentence break.
  -p, --prefix <PREFIX>       Reformat only lines beginning with PREFIX, reattaching PREFIX to
                              reformatted lines. Unless -x is specified, leading whitespace will be
                              ignored when matching PREFIX.
  -P, --skip-prefix <PSKIP>   Do not reformat lines beginning with PSKIP. Unless -X is specified,
                              leading whitespace will be ignored when matching PSKIP
  -x, --exact-prefix          PREFIX must match at the beginning of the line with no preceding
                              whitespace.
  -X, --exact-skip-prefix     PSKIP must match at the beginning of the line with no preceding
                              whitespace.
  -w, --width <WIDTH>         Fill output lines up to a maximum of WIDTH columns, default 75. This
                              can be specified as a negative number in the first argument.
  -g, --goal <GOAL>           Goal width, default of 93% of WIDTH. Must be less than or equal to
                              WIDTH.
  -q, --quick                 Break lines more quickly at the expense of a potentially more ragged
                              appearance.
  -T, --tab-width <TABWIDTH>  Treat tabs as TABWIDTH spaces for determining line length, default 8.
                              Note that this is used only for calculating line lengths; tabs are
                              preserved in the output. [default: 8]
  -h, --help                  Print help
  -V, --version               Print version
Options (15)
OptionDescriptionSource
-c, --crown-marginFirst and second line of paragraph may have different indentations, in which case the first line's indentation is preserved, and each subsequent line's indentation matches the second line.help + man
-t, --tagged-paragraphLike -c, except that the first and second line of a paragraph *must* have different indentation or they are treated as separate paragraphs.help + man
-m, --preserve-headersAttempt to detect and preserve mail headers in the input.help + man
-s, --split-onlySplit lines only, do not reflow.help + man
-u, --uniform-spacingInsert exactly one space between words, and two between sentences.help + man
-p, --prefix PREFIXReformat only lines beginning with PREFIX, reattaching PREFIX to reformatted lines.help + man
-P, --skip-prefix PSKIPDo not reformat lines beginning with PSKIP.help + man
-x, --exact-prefixPREFIX must match at the beginning of the line with no preceding whitespace.help + man
-X, --exact-skip-prefixPSKIP must match at the beginning of the line with no preceding whitespace.help + man
-w, --width WIDTHFill output lines up to a maximum of WIDTH columns, default 75.help + man
-g, --goal GOALGoal width, default of 93% of WIDTH.help + man
-q, --quickBreak lines more quickly at the expense of a potentially more ragged appearance.help + man
-T, --tab-width TABWIDTHTreat tabs as TABWIDTH spaces for determining line length, default 8.help
-h, --helpPrint helphelp + man
-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.