uTools-Manuals/docs/linux/killall.html
2019-04-21 11:50:48 +08:00

23 lines
1.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1 id="killall">killall</h1>
<p>使用进程的名称来杀死一组进程</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>killall命令</strong> 使用进程的名称来杀死进程使用此指令可以杀死一组同名进程。我们可以使用kill命令杀死指定进程PID的进程如果要找到我们需要杀死的进程我们还需要在之前使用ps等命令再配合grep来查找进程而killall把这两个过程合二为一是一个很好用的命令。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">killall(选项)(参数)</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">-e对长名称进行精确匹配
-l忽略大小写的不同
-p杀死进程所属的进程组
-i交互式杀死进程杀死进程前需要进行确认
-l打印所有已知信号列表
-q如果没有进程被杀死。则不输出任何信息
-r使用正规表达式匹配要杀死的进程名称
-s用指定的进程号代替默认信号“SIGTERM”
-u杀死指定用户的进程。</code></pre>
<h3 id="参数">参数</h3>
<p>进程名称:指定要杀死的进程名称。</p>
<h3 id="实例">实例</h3>
<p>杀死所有同名进程</p>
<pre><code class="language-bash">killall vi</code></pre>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->