{
    "content": [
        {
            "type": "text",
            "text": "# head (man)\n\n## NAME\n\nhead - output the first part of files\n\n## SYNOPSIS\n\nhead [OPTION]... [FILE]...\n\n## DESCRIPTION\n\nPrint  the  first 10 lines of each FILE to standard output.  With more than one FILE, precede\neach with a header giving the file name.\n\n## TLDR\n\n> Output the first part of files.\n\n- Output the first few lines of a file:\n  `head -n {{count}} {{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": "head",
        "section": "",
        "mode": "man",
        "summary": "head - output the first part of files",
        "synopsis": "head [OPTION]... [FILE]...",
        "tldr_summary": "Output the first part of files.",
        "tldr_examples": [
            {
                "description": "Output the first few lines of a file",
                "command": "head -n {{count}} {{path/to/file}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-c",
                "long": "--bytes",
                "arg": null,
                "description": "print the first NUM bytes of each file; with the leading '-', print all but the last NUM bytes of each file"
            },
            {
                "flag": "-n",
                "long": "--lines",
                "arg": null,
                "description": "print the first NUM lines instead of the first 10; with the leading '-', print all but the last NUM lines of each file"
            },
            {
                "flag": "-q",
                "long": "--silent",
                "arg": null,
                "description": "never print headers giving file names"
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "always print headers giving file names"
            },
            {
                "flag": "-z",
                "long": "--zero-terminated",
                "arg": null,
                "description": "line delimiter is NUL, not newline --help display this help and exit"
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "output version information and exit NUM may have a multiplier suffix: b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024, GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y. Binary prefixes can be used, too: KiB=K, MiB=M, and so on."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "tail",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/tail/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 7,
                "subsections": [
                    {
                        "name": "-c --bytes",
                        "lines": 3,
                        "flag": "-c",
                        "long": "--bytes"
                    },
                    {
                        "name": "-n --lines",
                        "lines": 3,
                        "flag": "-n",
                        "long": "--lines"
                    },
                    {
                        "name": "-q --quiet --silent",
                        "lines": 2,
                        "flag": "-q",
                        "long": "--silent"
                    },
                    {
                        "name": "-v --verbose",
                        "lines": 2,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-z --zero-terminated",
                        "lines": 4,
                        "flag": "-z",
                        "long": "--zero-terminated"
                    },
                    {
                        "name": "--version",
                        "lines": 6,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 8,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "head - output the first part of files\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "head [OPTION]... [FILE]...\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Print  the  first 10 lines of each FILE to standard output.  With more than one FILE, precede\neach with a header giving the file name.\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": "-c --bytes",
                        "content": "print the first NUM bytes of each file; with the leading '-', print all but  the  last\nNUM bytes of each file\n",
                        "flag": "-c",
                        "long": "--bytes"
                    },
                    {
                        "name": "-n --lines",
                        "content": "print the first NUM lines instead of the first 10; with the leading '-', print all but\nthe last NUM lines of each file\n",
                        "flag": "-n",
                        "long": "--lines"
                    },
                    {
                        "name": "-q --quiet --silent",
                        "content": "never print headers giving file names\n",
                        "flag": "-q",
                        "long": "--silent"
                    },
                    {
                        "name": "-v --verbose",
                        "content": "always print headers giving file names\n",
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-z --zero-terminated",
                        "content": "line delimiter is NUL, not newline\n\n--help display this help and exit\n",
                        "flag": "-z",
                        "long": "--zero-terminated"
                    },
                    {
                        "name": "--version",
                        "content": "output version information and exit\n\nNUM may have a multiplier suffix: b 512, kB 1000, K  1024,  MB  1000*1000,  M  1024*1024,  GB\n1000*1000*1000,  G 1024*1024*1024, and so on for T, P, E, Z, Y.  Binary prefixes can be used,\ntoo: KiB=K, MiB=M, and so on.\n",
                        "long": "--version"
                    }
                ]
            },
            "AUTHOR": {
                "content": "Written by David MacKenzie and Jim Meyering.\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": "tail(1)\n\nFull documentation <https://www.gnu.org/software/coreutils/head>\nor available locally via: info '(coreutils) head invocation'\n\n\n\nGNU coreutils 8.32                          January 2026                                     HEAD(1)",
                "subsections": []
            }
        }
    }
}