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 --help
45 display this help and exit
46
47 --version
48 output version information and exit
49
50 DURATION is a floating point number with an optional suffix: 's' for
51 seconds (the default), 'm' for minutes, 'h' for hours or 'd' for days.
52
53 If the command times out, and --preserve-status is not set, then exit
54 with status 124. Otherwise, exit with the status of COMMAND. If no
55 signal is specified, send the TERM signal upon timeout. The TERM sig‐
56 nal kills any process that does not block or catch that signal. It may
57 be necessary to use the KILL (9) signal, since this signal cannot be
58 caught, in which case the exit status is 128+9 rather than 124.
59
60 GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
61 Report timeout translation bugs to <http://translationpro‐
62 ject.org/team/>
63
65 Some platforms don't curently support timeouts beyond 2038
66
68 Written by Padraig Brady.
69
71 Copyright © 2013 Free Software Foundation, Inc. License GPLv3+: GNU
72 GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
73 This is free software: you are free to change and redistribute it.
74 There is NO WARRANTY, to the extent permitted by law.
75
77 kill(1)
78
79 The full documentation for timeout is maintained as a Texinfo manual.
80 If the info and timeout programs are properly installed at your site,
81 the command
82
83 info coreutils 'timeout invocation'
84
85 should give you access to the complete manual.
86
87
88
89GNU coreutils 8.22 October 2018 TIMEOUT(1)