{
    "content": [
        {
            "type": "text",
            "text": "# fold (man)\n\n## NAME\n\nfold - wrap each input line to fit in specified width\n\n## SYNOPSIS\n\nfold [OPTION]... [FILE]...\n\n## DESCRIPTION\n\nWrap input lines in each FILE, writing to standard output.\n\n## TLDR\n\n> Wrap each line in an input file to fit a specified width and print it to `stdout`.\n\n- Wrap each line to default width (80 characters):\n  `fold {{path/to/file}}`\n- Wrap each line to width \"30\":\n  `fold -w30 {{path/to/file}}`\n- 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):\n  `fold -w5 -s {{path/to/file}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (4 subsections)\n- **AUTHOR**\n- **REPORTING BUGS**\n- **COPYRIGHT**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "fold",
        "section": "",
        "mode": "man",
        "summary": "fold - wrap each input line to fit in specified width",
        "synopsis": "fold [OPTION]... [FILE]...",
        "tldr_summary": "Wrap each line in an input file to fit a specified width and print it to `stdout`.",
        "tldr_examples": [
            {
                "description": "Wrap each line to default width (80 characters)",
                "command": "fold {{path/to/file}}"
            },
            {
                "description": "Wrap each line to width \"30\"",
                "command": "fold -w30 {{path/to/file}}"
            },
            {
                "description": "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)",
                "command": "fold -w5 -s {{path/to/file}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-b",
                "long": "--bytes",
                "arg": null,
                "description": "count bytes rather than columns"
            },
            {
                "flag": "-s",
                "long": "--spaces",
                "arg": null,
                "description": "break at spaces"
            },
            {
                "flag": "-w",
                "long": "--width",
                "arg": null,
                "description": "use WIDTH columns instead of 80 --help display this help and exit"
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "output version information and exit"
            }
        ],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 6,
                "subsections": [
                    {
                        "name": "-b --bytes",
                        "lines": 2,
                        "flag": "-b",
                        "long": "--bytes"
                    },
                    {
                        "name": "-s --spaces",
                        "lines": 2,
                        "flag": "-s",
                        "long": "--spaces"
                    },
                    {
                        "name": "-w --width",
                        "lines": 4,
                        "flag": "-w",
                        "long": "--width"
                    },
                    {
                        "name": "--version",
                        "lines": 2,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "fold - wrap each input line to fit in specified width\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "fold [OPTION]... [FILE]...\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Wrap input lines in each FILE, writing to standard output.\n\nWith no FILE, or when FILE is -, read standard input.\n\nMandatory arguments to long options are mandatory for short options too.\n",
                "subsections": [
                    {
                        "name": "-b --bytes",
                        "content": "count bytes rather than columns\n",
                        "flag": "-b",
                        "long": "--bytes"
                    },
                    {
                        "name": "-s --spaces",
                        "content": "break at spaces\n",
                        "flag": "-s",
                        "long": "--spaces"
                    },
                    {
                        "name": "-w --width",
                        "content": "use WIDTH columns instead of 80\n\n--help display this help and exit\n",
                        "flag": "-w",
                        "long": "--width"
                    },
                    {
                        "name": "--version",
                        "content": "output version information and exit\n",
                        "long": "--version"
                    }
                ]
            },
            "AUTHOR": {
                "content": "Written by David MacKenzie.\n",
                "subsections": []
            },
            "REPORTING BUGS": {
                "content": "GNU coreutils online help: <https://www.gnu.org/software/coreutils/>\nReport any translation bugs to <https://translationproject.org/team/>\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright  ©  2020 Free Software Foundation, Inc.  License GPLv3+: GNU GPL version 3 or later\n<https://gnu.org/licenses/gpl.html>.\nThis is free software: you are free to change and redistribute it.  There is NO WARRANTY,  to\nthe extent permitted by law.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Full documentation <https://www.gnu.org/software/coreutils/fold>\nor available locally via: info '(coreutils) fold invocation'\n\n\n\nGNU coreutils 8.32                          January 2026                                     FOLD(1)",
                "subsections": []
            }
        }
    }
}