{
    "content": [
        {
            "type": "text",
            "text": "# tail(1) (man)\n\n## TLDR\n\n> Display the last part of a file.\n\n- Show last 10 lines in a file:\n  `tail {{path/to/file}}`\n- Show last 10 lines of multiple files:\n  `tail {{path/to/file1 path/to/file2 ...}}`\n- Show last 5 lines in file:\n  `tail {{-5|--lines 5}} {{path/to/file}}`\n- Print a file from a specific line number:\n  `tail {{-n|--lines}} +{{count}} {{path/to/file}}`\n- Print a specific count of bytes from the end of a given file:\n  `tail {{-c|--bytes}} {{count}} {{path/to/file}}`\n- Print the last lines of a given file and keep reading it until `<Ctrl c>`:\n  `tail {{-f|--follow}} {{path/to/file}}`\n- Keep reading file until `<Ctrl c>`, even if the file is inaccessible:\n  `tail {{-F|--retry --follow}} {{path/to/file}}`\n- Show last `count` lines in a file and refresh every `seconds` seconds:\n  `tail {{-n|--lines}} {{count}} {{-s|--sleep-interval}} {{seconds}} {{-f|--follow}} {{path/to/file}}`\n\n*Source: tldr-pages*\n\n---\n\n**Summary:** tail - output the last part of files\n\n**Synopsis:** tail [OPTION]... [FILE]...\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -c | --bytes | — | output the last NUM bytes; or use -c +NUM to output starting with byte NUM of each file |\n| -f | — | — | output appended data as the file grows; an absent option argument means 'descriptor' |\n| -F | --retry | — |  |\n| -n | --lines | — | output the last NUM lines, instead of the last 10; or use -n +NUM to output starting with line NUM --max-unchanged-stats |\n| -q | --silent | — | never output headers giving file names |\n| — | --retry | — | keep trying to open a file if it is inaccessible |\n| -s | --sleep-interval | — | with -f, sleep for approximately N seconds (default 1.0) between iterations; with ino‐ tify and --pid=P, check process P |\n| -v | --verbose | — | always output headers giving file names |\n| -z | --zero-terminated | — | line delimiter is NUL, not newline --help display this help and exit |\n| — | --version | — | output version information and exit NUM may have a multiplier suffix: b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024, |\n\n## See Also\n\n- head(1)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (2 lines)\n- **DESCRIPTION** (7 lines) — 10 subsections\n  - -c --bytes (3 lines)\n  - -f --follow[= (4 lines)\n  - -F --follow --retry (1 lines)\n  - -n --lines (13 lines)\n  - -q --quiet --silent (2 lines)\n  - --retry (2 lines)\n  - -s --sleep-interval (3 lines)\n  - -v --verbose (2 lines)\n  - -z --zero-terminated (4 lines)\n  - --version (12 lines)\n- **AUTHOR** (2 lines)\n- **REPORTING BUGS** (3 lines)\n- **COPYRIGHT** (5 lines)\n- **SEE ALSO** (8 lines)\n\n## Full Content\n\n### NAME\n\ntail - output the last part of files\n\n### SYNOPSIS\n\ntail [OPTION]... [FILE]...\n\n### DESCRIPTION\n\nPrint  the  last  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\n#### -c --bytes\n\noutput the last NUM bytes; or use -c +NUM to output starting with  byte  NUM  of  each\nfile\n\n#### -f --follow[=\n\noutput appended data as the file grows;\n\nan absent option argument means 'descriptor'\n\n#### -F --follow --retry\n\n#### -n --lines\n\noutput  the  last NUM lines, instead of the last 10; or use -n +NUM to output starting\nwith line NUM\n\n--max-unchanged-stats=N\nwith --follow=name, reopen a FILE which has not\n\nchanged size after N (default 5) iterations to see if it has been unlinked or  renamed\n(this  is  the  usual  case of rotated log files); with inotify, this option is rarely\nuseful\n\n--pid=PID\nwith -f, terminate after process ID, PID dies\n\n#### -q --quiet --silent\n\nnever output headers giving file names\n\n#### --retry\n\nkeep trying to open a file if it is inaccessible\n\n#### -s --sleep-interval\n\nwith -f, sleep for approximately N seconds (default 1.0) between iterations; with ino‐\ntify and --pid=P, check process P at least once every N seconds\n\n#### -v --verbose\n\nalways output headers giving file names\n\n#### -z --zero-terminated\n\nline delimiter is NUL, not newline\n\n--help display this help and exit\n\n#### --version\n\noutput 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\nWith  --follow (-f), tail defaults to following the file descriptor, which means that even if\na tail'ed file is renamed, tail will continue to track its end.  This default behavior is not\ndesirable  when you really want to track the actual name of the file, not the file descriptor\n(e.g., log rotation).  Use --follow=name in that case.  That causes tail to track  the  named\nfile in a way that accommodates renaming, removal and creation.\n\n### AUTHOR\n\nWritten by Paul Rubin, David MacKenzie, Ian Lance Taylor, and Jim Meyering.\n\n### REPORTING BUGS\n\nGNU coreutils online help: <https://www.gnu.org/software/coreutils/>\nReport any translation bugs to <https://translationproject.org/team/>\n\n### COPYRIGHT\n\nCopyright  ©  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\n### SEE ALSO\n\nhead(1)\n\nFull documentation <https://www.gnu.org/software/coreutils/tail>\nor available locally via: info '(coreutils) tail invocation'\n\n\n\nGNU coreutils 8.32                          January 2026                                     TAIL(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "tail",
        "section": "1",
        "mode": "man",
        "summary": "tail - output the last part of files",
        "synopsis": "tail [OPTION]... [FILE]...",
        "tldr_summary": "Display the last part of a file.",
        "tldr_examples": [
            {
                "description": "Show last 10 lines in a file",
                "command": "tail {{path/to/file}}"
            },
            {
                "description": "Show last 10 lines of multiple files",
                "command": "tail {{path/to/file1 path/to/file2 ...}}"
            },
            {
                "description": "Show last 5 lines in file",
                "command": "tail {{-5|--lines 5}} {{path/to/file}}"
            },
            {
                "description": "Print a file from a specific line number",
                "command": "tail {{-n|--lines}} +{{count}} {{path/to/file}}"
            },
            {
                "description": "Print a specific count of bytes from the end of a given file",
                "command": "tail {{-c|--bytes}} {{count}} {{path/to/file}}"
            },
            {
                "description": "Print the last lines of a given file and keep reading it until `<Ctrl c>`",
                "command": "tail {{-f|--follow}} {{path/to/file}}"
            },
            {
                "description": "Keep reading file until `<Ctrl c>`, even if the file is inaccessible",
                "command": "tail {{-F|--retry --follow}} {{path/to/file}}"
            },
            {
                "description": "Show last `count` lines in a file and refresh every `seconds` seconds",
                "command": "tail {{-n|--lines}} {{count}} {{-s|--sleep-interval}} {{seconds}} {{-f|--follow}} {{path/to/file}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-c",
                "long": "--bytes",
                "arg": null,
                "description": "output the last NUM bytes; or use -c +NUM to output starting with byte NUM of each file"
            },
            {
                "flag": "-f",
                "long": null,
                "arg": null,
                "description": "output appended data as the file grows; an absent option argument means 'descriptor'"
            },
            {
                "flag": "-F",
                "long": "--retry",
                "arg": null,
                "description": ""
            },
            {
                "flag": "-n",
                "long": "--lines",
                "arg": null,
                "description": "output the last NUM lines, instead of the last 10; or use -n +NUM to output starting with line NUM --max-unchanged-stats=N with --follow=name, reopen a FILE which has not changed size after N (default 5) iterations to see if it has been unlinked or renamed (this is the usual case of rotated log files); with inotify, this option is rarely useful --pid=PID with -f, terminate after process ID, PID dies"
            },
            {
                "flag": "-q",
                "long": "--silent",
                "arg": null,
                "description": "never output headers giving file names"
            },
            {
                "flag": "",
                "long": "--retry",
                "arg": null,
                "description": "keep trying to open a file if it is inaccessible"
            },
            {
                "flag": "-s",
                "long": "--sleep-interval",
                "arg": null,
                "description": "with -f, sleep for approximately N seconds (default 1.0) between iterations; with ino‐ tify and --pid=P, check process P at least once every N seconds"
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "always output 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. With --follow (-f), tail defaults to following the file descriptor, which means that even if a tail'ed file is renamed, tail will continue to track its end. This default behavior is not desirable when you really want to track the actual name of the file, not the file descriptor (e.g., log rotation). Use --follow=name in that case. That causes tail to track the named file in a way that accommodates renaming, removal and creation."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "head",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/head/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": "-f --follow[=",
                        "lines": 4,
                        "flag": "-f"
                    },
                    {
                        "name": "-F --follow --retry",
                        "lines": 1,
                        "flag": "-F",
                        "long": "--retry"
                    },
                    {
                        "name": "-n --lines",
                        "lines": 13,
                        "flag": "-n",
                        "long": "--lines"
                    },
                    {
                        "name": "-q --quiet --silent",
                        "lines": 2,
                        "flag": "-q",
                        "long": "--silent"
                    },
                    {
                        "name": "--retry",
                        "lines": 2,
                        "long": "--retry"
                    },
                    {
                        "name": "-s --sleep-interval",
                        "lines": 3,
                        "flag": "-s",
                        "long": "--sleep-interval"
                    },
                    {
                        "name": "-v --verbose",
                        "lines": 2,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-z --zero-terminated",
                        "lines": 4,
                        "flag": "-z",
                        "long": "--zero-terminated"
                    },
                    {
                        "name": "--version",
                        "lines": 12,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 8,
                "subsections": []
            }
        ]
    }
}