FOLD(1)

NAME
fold - fold long lines

SYNOPSIS
fold [-b] [-s] [-w width | -width] [file ...]

DESCRIPTION
Fold reads its input files, or of standard input if no file argument is present, and folds lines that exceed 80 columns (i.e. it inserts newline characters). It interprets backspace, tabulator, and carriage return characters in input.

The following options are accepted by fold:

-b  Use bytes instead of columns. All characters except for the newline character are counted according to the space consumed in bytes.

-s  Try to preserve words, if possible. If a blank character appears in an input line before it exceeds the width limit, the line is prematurely folded after this character.

-w width
    Set the maximum output line length (in columns or bytes) to width instead of the default 80.

ENVIRONMENT VARIABLES

LANG, LC_ALL
    See locale(7).

LC_CTYPE
    Determines the mapping of bytes to characters and the set of blank characters. Multibyte characters are not split by fold; the line is folded before the character that would cause it to exceed the maximum width.

SEE ALSO
fmt(1), pr(1)