{"id":4962,"date":"2019-09-21T21:02:36","date_gmt":"2019-09-21T13:02:36","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=4962"},"modified":"2019-09-21T21:02:40","modified_gmt":"2019-09-21T13:02:40","slug":"dpkg-divert","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/dpkg-divert","title":{"rendered":"dpkg-divert\u547d\u4ee4 – \u5c06\u6587\u4ef6\u5b89\u88c5\u5230\u8f6c\u79fb\u76ee\u5f55"},"content":{"rendered":"\n

dpkg-divert\u547d\u4ee4\u662f\u7528\u4e8e\u5c06\u5f15\u8d77\u51b2\u7a81\u7684\u6587\u4ef6\u5b89\u88c5\u5230\u8f6c\u79fb\u76ee\u5f55\u800c\u975e\u9ed8\u8ba4\u76ee\u5f55\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f:<\/strong> dpkg-divert [\u53c2\u6570] [\u6587\u4ef6]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n
-- -add<\/td>\u6dfb\u52a0\u4e00\u4e2a\u8f6c\u79fb\u6587\u4ef6<\/td><\/tr>
-- -remove<\/td>\u5220\u9664\u4e00\u4e2a\u8f6c\u79fb\u6587\u4ef6<\/td><\/tr>
-- -list<\/td>\u5217\u51fa\u5339\u914d\u7684\u8f6c\u79fb<\/td><\/tr>
-- -truename<\/td>\u5bf9\u5e94\u8f6c\u79fb\u6587\u4ef6\u771f\u5b9e\u6587\u4ef6\u540d<\/td><\/tr>
-- -quidet<\/td>\u5b89\u9759\u6a21\u5f0f<\/td><\/tr><\/tbody><\/table>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u6307\u5b9a\u8f6f\u4ef6\u5305wibble\u5b89\u88c5\u65f6\uff0c\u5199\u5165\/usr\/bin\/linuxcool.foo\uff0c\u800c\u4e0d\u662f\/usr\/bin\/ linuxcool\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# dpkg-divert --package wibble --divert \/usr\/bin\/linuxcool.foo --rename \/usr\/bin\/linuxcool<\/pre>\n\n\n\n

\u6307\u5b9a\u8f6f\u4ef6\u5305wibble\u5b89\u88c5\u65f6\uff0c\u5220\u9664\u5bf9\/usr\/bin\/linuxcool\u7684\u8f6c\u79fb\u4fee\u6539\uff1a <\/p>\n\n\n\n

[root@linuxcool ~]# dpkg-divert --package wibble --rename --remove \/usr\/bin\/linuxcool<\/pre>\n\n\n\n

\u5220\u9664\u5bf9\/usr\/bin\/linuxcool\u7684\u8f6c\u79fb\u4fee\u6539\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# dpkg-divert --rename --remove \/usr\/bin\/linuxcool<\/pre>\n\n\n\n

\u6dfb\u52a0\u4e00\u4e2a\u8f6f\u4ef6\u5305\u5b89\u88c5\u65f6\uff0c\u5199\u5165\/usr\/bin\/linuxcool.foo\uff0c\u800c\u4e0d\u662f\/usr\/bin\/ linuxcool\u7684\u4fee\u6539\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# dpkg-divert --divert \/usr\/bin\/linuxcool.foo --rename \/usr\/bin\/linuxcool<\/pre>\n","protected":false},"excerpt":{"rendered":"

dpkg-divert\u547d\u4ee4\u662f\u7528\u4e8e\u5c06\u5f15\u8d77\u51b2\u7a81\u7684\u6587\u4ef6\u5b89\u88c5\u5230\u8f6c\u79fb\u76ee\u5f55\u800c\u975e\u9ed8\u8ba4\u76ee\u5f55\u3002 \u8bed\u6cd5\u683c\u5f0f: dpkg-diver […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4962"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=4962"}],"version-history":[{"count":3,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4962\/revisions"}],"predecessor-version":[{"id":5011,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4962\/revisions\/5011"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=4962"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=4962"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=4962"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}