{
    "content": [
        {
            "type": "text",
            "text": "# timeout(1) (man)\n\n**Summary:** timeout - run a command with a time limit\n\n**Synopsis:** timeout [OPTION] DURATION COMMAND [ARG]...\ntimeout [OPTION]\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| — | --preserve-status | — | exit with the same status as COMMAND, even when the command times out |\n| — | --foreground | — | when not running timeout directly from a shell prompt, allow COMMAND to read from the TTY and get TTY signals; in this m |\n| -k | --kill-after | — | also send a KILL signal if COMMAND is still running this long after the initial signal was sent |\n| -s | --signal | — | specify the signal to be sent on timeout; SIGNAL may be a name like 'HUP' or a number; see 'kill -l' for a list of signa |\n| -v | --verbose | — | diagnose to stderr any signal sent upon timeout --help display this help and exit |\n| — | --version | — | output version information and exit DURATION is a floating point number with an optional suffix: 's' for seconds (the de |\n\n## See Also\n\n- kill(1)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (3 lines)\n- **DESCRIPTION** (4 lines) — 6 subsections\n  - --preserve-status (4 lines)\n  - --foreground (5 lines)\n  - -k --kill-after (4 lines)\n  - -s --signal (4 lines)\n  - -v --verbose (4 lines)\n  - --version (12 lines)\n- **BUGS** (2 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\ntimeout - run a command with a time limit\n\n### SYNOPSIS\n\ntimeout [OPTION] DURATION COMMAND [ARG]...\ntimeout [OPTION]\n\n### DESCRIPTION\n\nStart COMMAND, and kill it if still running after DURATION.\n\nMandatory arguments to long options are mandatory for short options too.\n\n#### --preserve-status\n\nexit with the same status as COMMAND, even when the\n\ncommand times out\n\n#### --foreground\n\nwhen not running timeout directly from a shell prompt,\n\nallow COMMAND to read from the TTY and get TTY signals; in this mode, children of COM‐\nMAND will not be timed out\n\n#### -k --kill-after\n\nalso send a KILL signal if COMMAND is still running\n\nthis long after the initial signal was sent\n\n#### -s --signal\n\nspecify the signal to be sent on timeout;\n\nSIGNAL may be a name like 'HUP' or a number; see 'kill -l' for a list of signals\n\n#### -v --verbose\n\ndiagnose to stderr any signal sent upon timeout\n\n--help display this help and exit\n\n#### --version\n\noutput version information and exit\n\nDURATION is a floating point number with an optional suffix: 's' for seconds  (the  default),\n'm'  for  minutes,  'h'  for  hours or 'd' for days.  A duration of 0 disables the associated\ntimeout.\n\nIf the command times out, and --preserve-status is not set, then exit with status 124.   Oth‐\nerwise,  exit  with  the  status of COMMAND.  If no signal is specified, send the TERM signal\nupon timeout.  The TERM signal kills any process that does not block or  catch  that  signal.\nIt  may be necessary to use the KILL (9) signal, since this signal cannot be caught, in which\ncase the exit status is 128+9 rather than 124.\n\n### BUGS\n\nSome platforms don't currently support timeouts beyond the year 2038.\n\n### AUTHOR\n\nWritten by Padraig Brady.\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\nkill(1)\n\nFull documentation <https://www.gnu.org/software/coreutils/timeout>\nor available locally via: info '(coreutils) timeout invocation'\n\n\n\nGNU coreutils 8.32                          January 2026                                  TIMEOUT(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "timeout",
        "section": "1",
        "mode": "man",
        "summary": "timeout - run a command with a time limit",
        "synopsis": "timeout [OPTION] DURATION COMMAND [ARG]...\ntimeout [OPTION]",
        "flags": [
            {
                "flag": "",
                "long": "--preserve-status",
                "arg": null,
                "description": "exit with the same status as COMMAND, even when the command times out"
            },
            {
                "flag": "",
                "long": "--foreground",
                "arg": null,
                "description": "when not running timeout directly from a shell prompt, allow COMMAND to read from the TTY and get TTY signals; in this mode, children of COM‐ MAND will not be timed out"
            },
            {
                "flag": "-k",
                "long": "--kill-after",
                "arg": null,
                "description": "also send a KILL signal if COMMAND is still running this long after the initial signal was sent"
            },
            {
                "flag": "-s",
                "long": "--signal",
                "arg": null,
                "description": "specify the signal to be sent on timeout; SIGNAL may be a name like 'HUP' or a number; see 'kill -l' for a list of signals"
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "diagnose to stderr any signal sent upon timeout --help display this help and exit"
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "output version information and exit DURATION is a floating point number with an optional suffix: 's' for seconds (the default), 'm' for minutes, 'h' for hours or 'd' for days. A duration of 0 disables the associated timeout. If the command times out, and --preserve-status is not set, then exit with status 124. Oth‐ erwise, exit with the status of COMMAND. If no signal is specified, send the TERM signal upon timeout. The TERM signal kills any process that does not block or catch that signal. It may be necessary to use the KILL (9) signal, since this signal cannot be caught, in which case the exit status is 128+9 rather than 124."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "kill",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/kill/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": [
                    {
                        "name": "--preserve-status",
                        "lines": 4,
                        "long": "--preserve-status"
                    },
                    {
                        "name": "--foreground",
                        "lines": 5,
                        "long": "--foreground"
                    },
                    {
                        "name": "-k --kill-after",
                        "lines": 4,
                        "flag": "-k",
                        "long": "--kill-after"
                    },
                    {
                        "name": "-s --signal",
                        "lines": 4,
                        "flag": "-s",
                        "long": "--signal"
                    },
                    {
                        "name": "-v --verbose",
                        "lines": 4,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "--version",
                        "lines": 12,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 8,
                "subsections": []
            }
        ]
    }
}