Use the dpkg-divert command of linux to install files to the transfer directory
This article will explain in detail about the use of linux dpkg-divert command to install files to the transfer directory, the editor thinks it is very practical, so share it for you to do a reference, I hope you can get something after reading this article.
The dpkg-divert command is used to install conflicting files to the transfer directory instead of the default directory.
Syntax format: dpkg-divert [parameters] [file]
Common parameters:
-add add a transfer file-remove deletes a transfer file-list lists matching transfers-truename corresponding to the transfer file real file name-quidet quiet mode
Reference example
Specifies that when the package wibble is installed, write / usr/bin/linuxcool.foo instead of / usr/bin/linuxcool:
[root@linuxcool] # dpkg-divert-- package wibble-- divert / usr/bin/linuxcool.foo-- rename / usr/bin/linuxcool
Specify that the transfer modification to / usr/bin/linuxcool is removed when the package wibble is installed:
[root@linuxcool] # dpkg-divert-- package wibble-- rename-- remove / usr/bin/linuxcool
Delete transfer modifications to / usr/bin/linuxcool:
[root@linuxcool] # dpkg-divert-- rename-- remove / usr/bin/linuxcool
When adding a package installation, write / usr/bin/linuxcool.foo instead of / usr/bin/linuxcool modification:
[root@linuxcool ~] # dpkg-divert-- divert / usr/bin/linuxcool.foo-- rename / usr/bin/linuxcool about using the dpkg-divert command of linux to install files to the transfer directory is shared here. I hope the above content can be helpful to you and learn more. If you think the article is good, you can share it for more people to see.