{
    "content": [
        {
            "type": "text",
            "text": "# wc (man)\n\n## NAME\n\nwc - print newline, word, and byte counts for each file\n\n## SYNOPSIS\n\nwc [OPTION]... [FILE]...\nwc [OPTION]... --files0-from=F\n\n## DESCRIPTION\n\nPrint newline, word, and byte counts for each FILE, and a total line if more than one FILE is\nspecified.  A word is a non-zero-length sequence of characters delimited by white space.\n\n## TLDR\n\n> Count lines, words, and bytes.\n\n- Count all lines in a file:\n  `wc {{-l|--lines}} {{path/to/file}}`\n- Count all words in a file:\n  `wc {{-w|--words}} {{path/to/file}}`\n- Count all bytes in a file:\n  `wc {{-c|--bytes}} {{path/to/file}}`\n- Count all characters in a file (taking multi-byte characters into account):\n  `wc {{-m|--chars}} {{path/to/file}}`\n- Count all lines, words, and bytes from `stdin`:\n  `{{find .}} | wc`\n- Count the length of the longest line in number of characters:\n  `wc {{-L|--max-line-length}} {{path/to/file}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (6 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": "wc",
        "section": "",
        "mode": "man",
        "summary": "wc - print newline, word, and byte counts for each file",
        "synopsis": "wc [OPTION]... [FILE]...\nwc [OPTION]... --files0-from=F",
        "tldr_summary": "Count lines, words, and bytes.",
        "tldr_examples": [
            {
                "description": "Count all lines in a file",
                "command": "wc {{-l|--lines}} {{path/to/file}}"
            },
            {
                "description": "Count all words in a file",
                "command": "wc {{-w|--words}} {{path/to/file}}"
            },
            {
                "description": "Count all bytes in a file",
                "command": "wc {{-c|--bytes}} {{path/to/file}}"
            },
            {
                "description": "Count all characters in a file (taking multi-byte characters into account)",
                "command": "wc {{-m|--chars}} {{path/to/file}}"
            },
            {
                "description": "Count all lines, words, and bytes from `stdin`",
                "command": "{{find .}} | wc"
            },
            {
                "description": "Count the length of the longest line in number of characters",
                "command": "wc {{-L|--max-line-length}} {{path/to/file}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-c",
                "long": "--bytes",
                "arg": null,
                "description": "print the byte counts"
            },
            {
                "flag": "-m",
                "long": "--chars",
                "arg": null,
                "description": "print the character counts"
            },
            {
                "flag": "-l",
                "long": "--lines",
                "arg": null,
                "description": "print the newline counts --files0-from=F read input from the files specified by NUL-terminated names in file F; If F is - then read names from standard input"
            },
            {
                "flag": "-L",
                "long": "--max-line-length",
                "arg": null,
                "description": "print the maximum display width"
            },
            {
                "flag": "-w",
                "long": "--words",
                "arg": null,
                "description": "print the word counts --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": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 8,
                "subsections": [
                    {
                        "name": "-c --bytes",
                        "lines": 2,
                        "flag": "-c",
                        "long": "--bytes"
                    },
                    {
                        "name": "-m --chars",
                        "lines": 2,
                        "flag": "-m",
                        "long": "--chars"
                    },
                    {
                        "name": "-l --lines",
                        "lines": 6,
                        "flag": "-l",
                        "long": "--lines"
                    },
                    {
                        "name": "-L --max-line-length",
                        "lines": 2,
                        "flag": "-L",
                        "long": "--max-line-length"
                    },
                    {
                        "name": "-w --words",
                        "lines": 4,
                        "flag": "-w",
                        "long": "--words"
                    },
                    {
                        "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": "wc - print newline, word, and byte counts for each file\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "wc [OPTION]... [FILE]...\nwc [OPTION]... --files0-from=F\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Print newline, word, and byte counts for each FILE, and a total line if more than one FILE is\nspecified.  A word is a non-zero-length sequence of characters delimited by white space.\n\nWith no FILE, or when FILE is -, read standard input.\n\nThe options below may be used to select which counts are printed, always in the following or‐\nder: newline, word, character, byte, maximum line length.\n",
                "subsections": [
                    {
                        "name": "-c --bytes",
                        "content": "print the byte counts\n",
                        "flag": "-c",
                        "long": "--bytes"
                    },
                    {
                        "name": "-m --chars",
                        "content": "print the character counts\n",
                        "flag": "-m",
                        "long": "--chars"
                    },
                    {
                        "name": "-l --lines",
                        "content": "print the newline counts\n\n--files0-from=F\nread  input from the files specified by NUL-terminated names in file F; If F is - then\nread names from standard input\n",
                        "flag": "-l",
                        "long": "--lines"
                    },
                    {
                        "name": "-L --max-line-length",
                        "content": "print the maximum display width\n",
                        "flag": "-L",
                        "long": "--max-line-length"
                    },
                    {
                        "name": "-w --words",
                        "content": "print the word counts\n\n--help display this help and exit\n",
                        "flag": "-w",
                        "long": "--words"
                    },
                    {
                        "name": "--version",
                        "content": "output version information and exit\n",
                        "long": "--version"
                    }
                ]
            },
            "AUTHOR": {
                "content": "Written by Paul Rubin and 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/wc>\nor available locally via: info '(coreutils) wc invocation'\n\n\n\nGNU coreutils 8.32                          January 2026                                       WC(1)",
                "subsections": []
            }
        }
    }
}