{
    "mode": "info",
    "parameter": "fold",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/fold/json",
    "generated": "2026-11-15T14:34:17Z",
    "sections": {
        "File: coreutils.info,  Node: fold invocation,  Prev: pr invocation,  Up: Formatting file contents": {
            "content": "",
            "subsections": [
                {
                    "name": "4.3 'fold': Wrap input lines to fit in specified width",
                    "content": "'fold' writes each FILE ('-' means standard input), or standard input if\nnone are given, to standard output, breaking long lines.  Synopsis:\n\nfold [OPTION]... [FILE]...\n\nBy default, 'fold' breaks lines wider than 80 columns.  The output is\nsplit into as many lines as necessary.\n\n'fold' counts screen columns by default; thus, a tab may count more\nthan one column, backspace decreases the column count, and carriage\nreturn sets the column to zero.\n\nThe program accepts the following options.  Also see *note Common\noptions::.\n\n'-b'\n'--bytes'\nCount bytes rather than columns, so that tabs, backspaces, and\ncarriage returns are each counted as taking up one column, just\nlike other characters.\n\n'-s'\n'--spaces'\nBreak at word boundaries: the line is broken after the last blank\nbefore the maximum line length.  If the line contains no such\nblanks, the line is broken at the maximum line length as usual.\n\n'-w WIDTH'\n'--width=WIDTH'\nUse a maximum line length of WIDTH columns instead of 80.\n\nFor compatibility 'fold' supports an obsolete option syntax\n'-WIDTH'.  New scripts should use '-w WIDTH' instead.\n\nAn exit status of zero indicates success, and a nonzero value\nindicates failure.\n"
                }
            ]
        }
    },
    "flags": [],
    "examples": [],
    "see_also": []
}