FOLD(1)

πŸ’– FOLD(1) πŸ’–

okay bestie, welcome to fold β€” she's a General Commands Manual girly and she's here to wrap things. not gifts πŸŽ€, lines. let's get into it.


✨ NAME ✨

fold β€” writes each file (or standard input if no files are given) to standard output whilst breaking long lines

🌸 SYNOPSIS 🌸

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

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically: fold writes each file (or standard input if no files are given) to standard output whilst breaking long lines. that's the whole vibe. you hand her some long lines, she folds them up all neat like a fitted sheet that actually fits. no cap. πŸ’…

πŸ‘‘ OPTIONS πŸ‘‘

  • -b, --bytes β€” count using bytes rather than columns. meaning control characters such as newline are not treated specially. lowkey unhinged behavior but okay, she's serving it anyway 🫢
  • -c, --characters β€” count using character positions rather than display columns. one character, one unit. simple as. ✨
  • -s, --spaces β€” break lines at word boundaries rather than a hard cut-off. she's not gonna chop a word in half mid-syllable, she has manners πŸŽ€
  • -w, --width <WIDTH> β€” set WIDTH as the maximum line width rather than 80. you don't like 80? pick your own number, main character energy 🌈
  • -h, --help β€” Print help. when in doubt, ask her πŸ’–
  • -V, --version β€” Print version. flex the fit ⭐

πŸ’œ VERSION πŸ’œ

v(uutils coreutils) 0.12.0

πŸ“ EXAMPLES πŸ“

Wrap each line to default width (80 characters):

fold path/to/file

Wrap each line to width "30":

fold -w30 path/to/file

Wrap each line to width "5" and break the line at spaces (puts each space separated word in a new line, words with length > 5 are wrapped):

fold -w5 -s 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.

πŸ™ˆ bestie be aware: uutils is a work in progress, so some of these examples might just... not work. it's not you, it's her. not me being dramatic, that's literally in the fine print πŸ’€

and that's the whole page, periodt! 🌟 she's dated 2026-09-25, that's the version ✨ v(uutils coreutils) 0.12.0 ✨ coming at you fresh from the uutils coreutils crew β€” stay folded, stay iconic πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from