You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.1 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

dpkg-divert
===
Debian Linux中创建并管理一个转向列表
## 说明
**dpkg-divert命令** 是Debian Linux中创建并管理一个转向diversion列表其使得安装文件的默认位置失效的工具
## 选项
```
dpkg-divert(选项)(参数)
```
```
--add添加一个转移文件
--remove删除一个转移文件
--list列出匹配的转移
--truename对应转移文件真实文件名
--quidet安静模式
```
### 参数
文件:指定转移文件名
## 实例
指定软件包wibble安装时写入`/usr/bin/example.foo`,而不是`/usr/bin/example`
```
dpkg-divert --package wibble --divert /usr/bin/example.foo --rename /usr/bin/example
```
指定软件包wibble安装时删除对`/usr/bin/example`的转移修改:
```
dpkg-divert --package wibble --rename --remove /usr/bin/example
```
删除对`/usr/bin/example`的转移修改:
```
dpkg-divert --rename --remove /usr/bin/example
```
添加一个软件包安装时,写入`/usr/bin/example.foo`,而不是`/usr/bin/example`的修改:
```
dpkg-divert --divert /usr/bin/example.foo --rename /usr/bin/example
```