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-xis specified, leading whitespace will be ignored when matching PREFIX.-P,--skip-prefix <PSKIP>β Do not reformat lines beginning with PSKIP. Unless-Xis 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, default75. 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 of93%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, default8. 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
- ubuntu stonking: rust-coreutils 0.12.0-1ubuntu2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms