管子钳厂家
免费服务热线

Free service

hotline

010-00000000
管子钳厂家
热门搜索:
成功案例
当前位置:首页 > 成功案例

看一看:killall 中文man页面

发布时间:2022-04-02 09:42:26 阅读: 来源:管子钳厂家
killall 中文man页面 作者:riser 2011-08-12 14:58:05 系统 killall 发送一条信号给所有运行任意指定命令的进程. 如果没有指定信号名, 则发送 SIGTERM. NAME (名称)

killall - 以名字方式来杀死进程

SYNOPSIS (总览)

killall [-egiqvw] [-signal] name ...
killall -l
killall -V

DESCRIPTION (描述)

killall 发送一条信号给所有运行任意指定命令的进程. 如果没有指定信号名, 则发送 SIGTERM.

信号可以以名字 (如 -HUP ) 或者数字 (如 -1 ) 的方式指定. 信号 0 (检查进程是否存在)只能以数字方式指定.

如果命令名包括斜杠 (/), 那么执行该特定文件的进程将被杀掉, 这与进程名无关.

如果对于所列命令无进程可杀, 那么 killall 会返回非零值. 如果对于每条命令至少杀死了一个进程, killall 返回 0.

killall 进程决不会杀死自己 (但是可以杀死其它 killall 进程).

OPTIONS (选项)
-e
对于很长的名字, 要求准确匹配. 如果一个命令名长于 15 个字符, 则可能不能用整个名字 (溢出了). 在这种情况下, killall 会杀死所有匹配名字前 15 个字符的所有进程. 有了 -e 选项,这样的记录将忽略. 如果同时指定了 -v 选项, killall 会针对每个忽略的记录打印一条消息.
-g
杀死属于该进程组的进程. kill 信号给每个组只发送一次, 即使同一进程组中包含多个进程.
-i
交互方式,在杀死进程之前征求确认信息.
-l
列出所有已知的信号名.
-q
如果没有进程杀死, 不会提出抱怨.
-v
报告信号是否成功发送.
-V
显示版本信息.
-w
等待所有杀的进程死去. killall 会每秒检查一次是否任何被杀的进程仍然存在新农村建设有证房子可以强拆吗, 仅当都死光后才返回. 注意: 如果信号被忽略或没有起作用, 或者进程停留在僵尸状态企业厂房拆迁补偿款如何记账, killall 可能会***等待.
FILES(相关文件)
/proc   proc文件系统的存在位置
KNOWN BUGS (已知 BUGS)

以文件方式杀死只对那些在执行时一直打开的可执行文件起作用, 也即, 混杂的可执行文件不能够通过这种方式杀死.

要警告的是输入 killall name 可能不会在非 Linux 系统上产生预期的效果, 特别是特权用户执行时要小心.

在两次扫描的间隙, 如果进程消失了而被代之以一个有同样 PID 的新进程, killall -w 侦测不到.

AUTHOR (作者)

Werner Almesberger <Werner.Almesberger@epfl.ch>

SEE ALSO (又见)

kill(1), fuser(1), pidof(1), ps(1), kill(2)

#p#

NAME

killall - kill processes by name

SYNOPSIS

killall [-c,--context] [-e,--exact] [-g,--process-group] [-i,--interactive] [-q,--quiet] [-s,--signal signal] [-v,--verbose] [-w,--wait] [-V,--version] [--] name ...
killall -l
killall -V,--version

DESCRIPTION

killall sends a signal to all processes running any of the specified commands. If no signal name is specified, SIGTERM is sent.

Signals can be specified either by name (e.g. -HUP) or by number (e.g. -1).

If the command name contains a slash (/), processes executing that particular file will be selected for killing, independent of their name.

killall returns a zero return code if at least one process has been killed for each listed command. killall returns non-zero otherwise.

A killall process never kills itself (but may kill other killall processes).

OPTIONS
-e, --exact
Require an exact match for very long names. If a command name is longer than 15 characters, the full name may be unavailable (i.e. it is swapped out). In this case, killall will kill everything that matches within the first 15 characters. With -e, such entries are skipped. killall prints a message for each skipped entry if -v is specified in addition to -e,
-g, --process-group
Kill the process group to which the process belongs. The kill signal is only sent once per group, even if multiple processes belonging to the same process group were found.
-i, --interactive
Interactively ask for confirmation before killing.
-l, --list
List all known signal names.
-q, --quiet
Do not complain if no processes were killed.
-v, --verbose
Report if the signal was successfully sent.
-V, --version
Display version information.
-w, --wait
Wait for all killed processes to die. killall checks once per second if any of the killed processes still exist and only returns if none are left. Note that killall may wait forever if the signal was ignored, had no effect, or if the process stays in zombie state.
-Z
(SELinux Only) Specify security context: kill only processes with given security context. Must precede other arguments on the command line.
FILES
/proc   location of the proc file system
KNOWN BUGS

Killing by file only works for executables that are kept open during execution, i.e. impure executables can't be killed this way.

Be warned that typing killall name may not have the desired effect on non-Linux systems, especially when done by a privileged user.

killall -w doesn't detect if a process disappears and is replaced by a new process with the same PID between scans城市房屋违建认定标准.

AUTHORS

Werner Almesberger <werner@almesberger.net> wrote the original version of psmisc. Since version 20 Craig Small <csmall@small.dropbear.id.au> can be blamed.

SEE ALSO

kill(1),fuser(1),pgrep(1),pidof(1),pkill(1),ps(1),kill(2)