1TIMEOUT(1) User Commands TIMEOUT(1)
2
3
4
6 timeout - run a command with a time limit
7
9 timeout [OPTION] DURATION COMMAND [ARG]...
10 timeout [OPTION]
11
13 Start COMMAND, and kill it if still running after DURATION.
14
15 Mandatory arguments to long options are mandatory for short options
16 too.
17
18 --preserve-status
19
20 exit with the same status as COMMAND, even when the
21
22 command times out
23
24 --foreground
25
26 when not running timeout directly from a shell prompt,
27
28 allow COMMAND to read from the TTY and get TTY signals; in this
29 mode, children of COMMAND will not be timed out
30
31 -k, --kill-after=DURATION
32
33 also send a KILL signal if COMMAND is still running
34
35 this long after the initial signal was sent
36
37 -s, --signal=SIGNAL
38
39 specify the signal to be sent on timeout;
40
41 SIGNAL may be a name like 'HUP' or a number; see 'kill -l' for a
42 list of signals
43
44 -v, --verbose
45 diagnose to stderr any signal sent upon timeout
46
47 --help display this help and exit
48
49 --version
50 output version information and exit
51
52 DURATION is a floating point number with an optional suffix: 's' for
53 seconds (the default), 'm' for minutes, 'h' for hours or 'd' for days.
54 A duration of 0 disables the associated timeout.
55
56 If the command times out, and --preserve-status is not set, then exit
57 with status 124. Otherwise, exit with the status of COMMAND. If no
58 signal is specified, send the TERM signal upon timeout. The TERM sig‐
59 nal kills any process that does not block or catch that signal. It may
60 be necessary to use the KILL (9) signal, since this signal cannot be
61 caught, in which case the exit status is 128+9 rather than 124.
62
64 Some platforms don't currently support timeouts beyond the year 2038.
65
67 Written by Padraig Brady.
68
70 GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
71 Report any translation bugs to <https://translationproject.org/team/>
72
74 Copyright © 2019 Free Software Foundation, Inc. License GPLv3+: GNU
75 GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
76 This is free software: you are free to change and redistribute it.
77 There is NO WARRANTY, to the extent permitted by law.
78
80 kill(1)
81
82 Full documentation <https://www.gnu.org/software/coreutils/timeout>
83 or available locally via: info '(coreutils) timeout invocation'
84
85
86
87GNU coreutils 8.31 October 2019 TIMEOUT(1)