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

25 lines
1.7 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="dpkg-divert">dpkg-divert</h1>
<p>Debian Linux中创建并管理一个转向列表</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>dpkg-divert命令</strong> 是Debian Linux中创建并管理一个转向diversion列表其使得安装文件的默认位置失效的工具。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">dpkg-divert(选项)(参数)</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">--add添加一个转移文件
--remove删除一个转移文件
--list列出匹配的转移
--truename对应转移文件真实文件名
--quidet安静模式。</code></pre>
<h3 id="参数">参数</h3>
<p>文件:指定转移文件名。</p>
<h3 id="实例">实例</h3>
<p>指定软件包wibble安装时写入<code>/usr/bin/example.foo</code>,而不是<code>/usr/bin/example</code></p>
<pre><code class="language-bash">dpkg-divert --package wibble --divert /usr/bin/example.foo --rename /usr/bin/example</code></pre>
<p>指定软件包wibble安装时删除对<code>/usr/bin/example</code>的转移修改:</p>
<pre><code class="language-bash">dpkg-divert --package wibble --rename --remove /usr/bin/example</code></pre>
<p>删除对<code>/usr/bin/example</code>的转移修改:</p>
<pre><code class="language-bash">dpkg-divert --rename --remove /usr/bin/example</code></pre>
<p>添加一个软件包安装时,写入<code>/usr/bin/example.foo</code>,而不是<code>/usr/bin/example</code>的修改:</p>
<pre><code class="language-bash">dpkg-divert --divert /usr/bin/example.foo --rename /usr/bin/example</code></pre>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->