Man page - timeout(1)
Packages contas this manual
- timeout(1)
- ls(1)
- uname(1)
- runcon(1)
- nohup(1)
- dir(1)
- hostid(1)
- paste(1)
- sum(1)
- who(1)
- join(1)
- factor(1)
- touch(1)
- chown(1)
- md5sum(1)
- nl(1)
- mkdir(1)
- tac(1)
- false(1)
- stat(1)
- chmod(1)
- sha224sum(1)
- mktemp(1)
- readlink(1)
- seq(1)
- echo(1)
- comm(1)
- tsort(1)
- mkfifo(1)
- unexpand(1)
- cp(1)
- sha256sum(1)
- shred(1)
- tee(1)
- uniq(1)
- expr(1)
- sha384sum(1)
- basenc(1)
- ptx(1)
- fmt(1)
- chcon(1)
- wc(1)
- realpath(1)
- mv(1)
- sha512sum(1)
- yes(1)
- vdir(1)
- printf(1)
- b2sum(1)
- mknod(1)
- tail(1)
- chroot(8)
- tr(1)
- [(1)
- od(1)
- cut(1)
- date(1)
- cat(1)
- du(1)
- pr(1)
- fold(1)
- dirname(1)
- sha1sum(1)
- printenv(1)
- numfmt(1)
- nproc(1)
- chgrp(1)
- sync(1)
- ln(1)
- pwd(1)
- install(1)
- base64(1)
- test(1)
- true(1)
- cksum(1)
- tty(1)
- rmdir(1)
- expand(1)
- link(1)
- df(1)
- stty(1)
- dd(1)
- split(1)
- truncate(1)
- dircolors(1)
- head(1)
- shuf(1)
- id(1)
- basename(1)
- users(1)
- base32(1)
- nice(1)
- sort(1)
- sleep(1)
- unlink(1)
- logname(1)
- whoami(1)
- pathchk(1)
- rm(1)
- csplit(1)
- groups(1)
- stdbuf(1)
- arch(1)
- env(1)
- pinky(1)
apt-get install coreutils
Available languages:
en fr es pl nl da sv ja ro zh_TW zh_CN deManual
| TIMEOUT(1) | 用户命令 | TIMEOUT(1) |
名称
timeout - 在规定时限内运行一个命令
概述
timeout [选项列表]
持续时间 命令
[参数列表]...
timeout [选项列表]
描述
运行所给命令,如果它超过指定时间后仍在运行,则杀死其进程。
必选参数对长短选项同时适用。
--preserve-status
- 将退出状态值设为与所运行指令的退出状态相同的值,即使
- 指令运行超时
--foreground
- 当不是直接在 shell 命令提示符下运行 timeout 的情况下使用,
- 允许所运行命令直接由 TTY 读取数据,并且接收 TTY 的信号;在这种模式下,所运行命令的子进程将不会被 timeout 的超时控制所考虑
-k, --kill-after=持续时间
- 如果初始信号已发出且再次等待了指定时间之后
- 所运行命令仍在运行则发出 KILL 信号
-s, --signal=信号
- 指定超时发生时应当送出的信号;
- 信号可以是类似“HUP”的信号名或是信号数;从“kill -l”的输出可获得信号的列表
- -v, --verbose
- 对任何超时后发送的信号,向标准错误输出诊断信息
- --help
- 显示此帮助信息并退出
- --version
- 显示版本信息并退出
持续时间应当是一个浮点数,后缀是可选的:“s”表示秒(默认值),“m”表示分钟,“h”表示小时,或者使用“d”表示天数。若持续时间为 0,将禁用所关联的超时配置。
超时以后,如果没有指定其他“信号”,则向给定“命令”发送 TERM 信号。TERM 信号将杀死没有阻塞或捕获该信号的进程。有时可能需要使用 KILL 信号,因为此信号无法被捕获。
退出状态:
- 124
- 如果指定“命令”超时,且未指定 --preserve-status 选项
- 125
- 如果 timeout 命令本身执行失败
- 126
- 如果找到了命令,但无法执行
- 127
- 如果未找到命令
- 137
- 如果命令(或 timeout 命令本身)收到了 KILL (9) 信号(即 128+9)
- -
- 其他情况下,退出状态是命令的退出状态
缺陷
某些平台目前不支持将超时时间设置为超过 2038 年。
作者
由 Padraig Brady 编写。
报告错误
GNU coreutils 的在线帮助:
<https://www.gnu.org/software/coreutils/>
请向 <https://translationproject.org/team/zh_CN.html>
报告翻译错误。
版权
Copyright © 2022 Free Software Foundation, Inc. License
GPLv3+: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO
WARRANTY, to the extent permitted by law.
参见
kill(1)
完整文档请见:
<https://www.gnu.org/software/coreutils/timeout>
或者在本地使用: info
'(coreutils) timeout invocation'
跋
本页面中文版由中文
man 手册页计划提供。
中文 man
手册页计划:https://github.com/man-pages-zh/manpages-zh
| 2022年9月 | GNU coreutils 9.1 |