FMT(1)

πŸ’… FMT(1) β€” the paragraph glow-up page πŸ’…

okay bestie, so this is a page from the General Commands Manual, and it's about fmt, which is genuinely one of those little tools that just fixes your vibes. Sit down, get comfy, we're doing this. πŸŽ€


✨ NAME ✨

fmt β€” Reformat paragraphs from input (or standard input) to stdout.

no cap, that's the whole thing. it takes your messy little paragraphs and makes them pretty. πŸ’–


🌸 SYNOPSIS 🌸

[OPTION]... [FILE]...

yeah, that's it. options, then files. we move. πŸ¦‹


πŸ’œ DESCRIPTION πŸ’œ

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

so like β€” you feed it text from a file, or you pipe it in (standard input, bestie), and it re-wraps the paragraphs and hands the result back to you on stdout. that's the whole job. it's giving "personal stylist but for line breaks." πŸ’«


πŸ”₯ OPTIONS πŸ”₯

here come the flags, and there are so many of them, and every single one is important so we are NOT skipping any. πŸ‘‘

  • -c, --crown-margin β€” The first and second line of a paragraph may have different indentations, and if they do, the first line's indentation is preserved, and each subsequent line's indentation matches the second line. crown margin because the first line is wearing the crown, obviously. πŸ‘‘
  • -t, --tagged-paragraph β€” Like -c, EXCEPT that the first and second line of a paragraph must have different indentation, otherwise they get treated as separate paragraphs. no indentation difference? then they're two totally different paragraphs, it's not that deep. 😀
  • -m, --preserve-headers β€” Attempt to detect and preserve mail headers in the input. Be careful when combining this flag with -p. ⚠️ yeah, careful β€” those two together get a little spicy.
  • -s, --split-only β€” Split lines only, do not reflow. it splits, and that is ALL it does. no joining, no nothing. πŸ’…
  • -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. so precise. so uniform. ✨
  • -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. exact. no vibes-based matching. 🎯
  • -X, --exact-skip-prefix β€” PSKIP must match at the beginning of the line with no preceding whitespace. same energy, but for skipping. 🎯
  • -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. (negative width, in the FIRST argument β€” noted, bestie.)
  • -g, --goal <GOAL> β€” Goal width, default of 93% of WIDTH. Must be less than or equal to WIDTH. it's a goal, not a limit, but it CANNOT exceed the width, so don't try it. πŸ™ˆ
  • -q, --quick β€” Break lines more quickly at the expense of a potentially more ragged appearance. faster but messier, pick your struggle. πŸ’€
  • -T, --tab-width <TABWIDTH> [default: 8] β€” 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. so the tabs stay, they just get pretend counted. 🧚
  • -h, --help β€” Print help. we love a helper. 🫢
  • -V, --version β€” Print version. 🏷️
  • [FILES] β€” the actual files you want to feed it. πŸ“

🌈 VERSION 🌈

v(uutils coreutils) 0.12.0

that's the version, iconic behavior. ⭐


🫢 EXAMPLES 🫢

okay here's where it gets useful, pay attention. πŸ’–

Reformat a file:

fmt path/to/file

Reformat a file producing output lines of (at most) n characters:

fmt [-w|--width] n path/to/file

Reformat a file without joining lines shorter than the given width together:

fmt [-s|--split-only] path/to/file

Reformat a file with uniform spacing (1 space between words and 2 spaces between paragraphs):

fmt [-u|--uniform-spacing] path/to/file
The examples are provided by the tldr-pages project <https://tldr.sh> under the CC BY 4.0 License. Please note that, as uutils is a work in progress, some examples might fail.

yes okay, real talk: tldr-pages gave us the examples, CC BY 4.0 License, and also uutils is a work in progress so some examples might straight up fail. not a skill issue, it's a WIP issue. 😭


and that's the page, bestie!! πŸŽ€ this cutie was dated 2026-09-25 and it's from uutils coreutils 0.12.0 β€” go reformat something, you absolute main character. πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from