{"id":940,"date":"2013-02-25T10:28:11","date_gmt":"2013-02-25T02:28:11","guid":{"rendered":"http:\/\/www.dogeye.net\/?p=940"},"modified":"2013-02-25T10:28:11","modified_gmt":"2013-02-25T02:28:11","slug":"dpkg%e7%9a%84%e4%b8%80%e4%ba%9b%e7%94%a8%e6%b3%95","status":"publish","type":"post","link":"https:\/\/ykyi.net\/?p=940","title":{"rendered":"dpkg\u7684\u4e00\u4e9b\u7528\u6cd5"},"content":{"rendered":"<div class=\"showHead\" style=\"padding: 0px; margin: 5px 12px 0px; height: 60px; border-bottom-width: 1px; border-bottom-style: dashed; border-bottom-color: rgb(204, 204, 204); color: rgb(85, 85, 85); font-family: \u5b8b\u4f53, 'Arial Narrow', arial, serif; line-height: normal;\">\n<div class=\"showTitleBOx\" style=\"padding: 20px 0px 0px; margin: 0px; overflow: hidden; text-align: center;\">\n<div class=\"showTitle\" style=\"padding: 0px; margin: 0px; font-weight: bold; font-size: 20px; line-height: 20px; font-family: \u5b8b\u4f53;\">Debian\u7684dpkg\u7684\u4e00\u4e9b\u7528\u6cd5<\/div>\n<p>&nbsp;<\/p>\n<\/p><\/div>\n<\/div>\n<div class=\"showContent\" style=\"padding: 0px; margin: 20px 15px 8px; line-height: 2; font-size: 14px; border-bottom-width: 1px; border-bottom-style: dashed; border-bottom-color: rgb(217, 217, 217); word-wrap: break-word; word-break: normal; color: rgb(85, 85, 85); font-family: \u5b8b\u4f53, 'Arial Narrow', arial, serif;\"><b style=\"padding: 0px; margin: 0px;\">1. \u67e5\u770b\u5f53\u524d\u7cfb\u7edf\u4e2d\u7684\u8f6f\u4ef6\u4fe1\u606f(dpkg -l)<\/b><br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t&quot;dpkg -l&quot;\u547d\u4ee4\u7528\u4e8e\u67e5\u770b\u5f53\u524d\u7cfb\u7edf\u4e2d\u6240\u6709deb\u7684\u8f6f\u4ef6\u5305\u4fe1\u606f\uff1b\u901a\u8fc7&quot;dpkg -l&quot;\u547d\u4ee4\u4e0eless\u548cgrep\u547d\u4ee4\u914d\u5408\u4f7f\u7528\uff0c\u53ef\u4ee5\u5b9e\u73b0\u66f4\u590d\u6742\u7684\u8f6f\u4ef6\u5305\u4fe1\u606f\u67e5\u8be2\u529f\u80fd\u3002<br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t<br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t<span style=\"padding: 0px; margin: 0px; color: rgb(102, 102, 204);\">debian:~\/Desktop# dpkg -l<br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t\u671f\u671b\u72b6\u6001=\u672a\u77e5(u)\/\u5b89\u88c5(i)\/\u5220\u9664(r )\/\u6e05\u9664(p)\/\u4fdd\u6301(h)<br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t| \u5f53\u524d\u72b6\u6001=\u672a(n)\/\u5df2\u5b89\u88c5(i)\/\u4ec5\u5b58\u914d\u7f6e(c )\/\u4ec5\u89e3\u538b\u7f29(U)\/\u914d\u7f6e\u5931\u8d25(F)\/\u4e0d\u5b8c\u5168\u5b89\u88c5(H)<br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t|\/ \u9519\u8bef\uff1f=(\u65e0)\/\u4fdd\u6301(?)\/\u987b\u91cd\u88c5(R )\/\u4e24\u8005\u517c\u6709(#) (\u72b6\u6001\uff0c\u9519\u8bef\uff1a\u5927\u5199=\u6545\u969c)<br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t||\/ \u540d\u79f0 \u7248\u672c \u7b80\u4ecb<\/span><br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t<br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t<br style=\"padding: 0px; margin: 0px;\" \/><\/p>\n<p>\t<b style=\"padding: 0px; margin: 0px;\">2 \u67e5\u8be2\u5df2\u5b89\u88c5\u7684\u6307\u5b9a\u8f6f\u4ef6\u5305\u7684\u8be6\u7ec6\u4fe1\u606f(dpkg -s)<\/b><br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t\u4f7f\u7528&quot;dpkg -s&quot;\u547d\u4ee4\u67e5\u8be2ssh\u8f6f\u4ef6\u5305\u7684\u8be6\u7ec6\u4fe1\u606f<br style=\"padding: 0px; margin: 0px;\" \/><\/p>\n<p>\t<b style=\"padding: 0px; margin: 0px;\">3 \u67e5\u8be2\u7cfb\u7edf\u4e2d\u5df2\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305\u6240\u5b89\u88c5\u7684\u6587\u4ef6(dpkg -L)<\/b><br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t<br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t\u663e\u793a&quot;ssh&quot;\u8f6f\u4ef6\u5305\u5b89\u88c5\u5230\u7cfb\u7edf\u7684\u6587\u4ef6<br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t<br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t<span style=\"padding: 0px; margin: 0px; color: rgb(102, 102, 204);\">debian:~# dpkg -L ssh<br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t\/.<br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t\/usr<br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t\/usr\/share<br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t\/usr\/share\/doc<br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t\/usr\/share\/doc\/openssh-client<br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t\/usr\/share\/doc\/ssh<\/span><br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t<br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t4 \u67e5\u8be2\u7cfb\u7edf\u4e2d\u7684\u67d0\u4e2a\u6587\u4ef6\u5c5e\u4e8e\u54ea\u4e2a\u8f6f\u4ef6\u5305(dpkg -S)<br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t<br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t<span style=\"padding: 0px; margin: 0px; color: rgb(102, 102, 204);\">debian:~# dpkg -S \/etc\/init.d\/networking<br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\tnetbase: \/etc\/init.d\/networking<\/span><br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t\u6587\u4ef6&quot;\/etc\/init.d\/networking&quot;\u5c5e\u4e8e\u540d\u4e3a&quot;netbase&quot;\u7684\u8f6f\u4ef6\u5305\u3002<br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t<br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t<span style=\"padding: 0px; margin: 0px; color: rgb(102, 102, 204);\">debian:~# dpkg -S \/etc\/passwd<br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\tdpkg\uff1a\u6ca1\u6709\u627e\u5230 \/etc\/passwd\u3002<\/span><br style=\"padding: 0px; margin: 0px;\" \/><br \/>\n\t<br \/>\n\t\u7cfb\u7edf\u4e2d\u8bb8\u591a\u6587\u4ef6\u4e0d\u5c5e\u4e8e\u4efb\u4f55\u8f6f\u4ef6\u5305\uff0c\u5b83\u4eec\u53ef\u80fd\u662f\u7528\u6237<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Debian\u7684dpkg\u7684\u4e00\u4e9b\u7528\u6cd5 &nbsp; 1. \u67e5\u770b\u5f53\u524d\u7cfb\u7edf\u4e2d\u7684\u8f6f\u4ef6\u4fe1\u606f(dpkg -l) &quot;dpkg -l&quot;\u547d\u4ee4\u7528\u4e8e\u67e5\u770b\u5f53\u524d\u7cfb\u7edf\u4e2d\u6240\u6709deb\u7684\u8f6f\u4ef6\u5305\u4fe1\u606f\uff1b\u901a\u8fc7&quot;dpkg -l&quot;\u547d\u4ee4\u4e0eless\u548cgrep\u547d\u4ee4\u914d\u5408\u4f7f\u7528\uff0c\u53ef\u4ee5\u5b9e\u73b0\u66f4\u590d\u6742\u7684\u8f6f\u4ef6\u5305\u4fe1\u606f\u67e5\u8be2\u529f\u80fd\u3002 debian:~\/Desktop# dpkg -l \u671f\u671b\u72b6\u6001=\u672a\u77e5(u)\/\u5b89\u88c5(i)\/\u5220\u9664(r )\/\u6e05\u9664(p)\/\u4fdd\u6301(h) | \u5f53\u524d\u72b6\u6001=\u672a(n)\/\u5df2\u5b89\u88c5(i)\/\u4ec5\u5b58\u914d\u7f6e(c )\/\u4ec5\u89e3\u538b\u7f29(U)\/\u914d\u7f6e\u5931\u8d25(F)\/\u4e0d\u5b8c\u5168\u5b89\u88c5(H) |\/ \u9519\u8bef\uff1f=(\u65e0)\/\u4fdd\u6301(?)\/\u987b\u91cd\u88c5(R )\/\u4e24\u8005\u517c\u6709(#) (\u72b6\u6001\uff0c\u9519\u8bef\uff1a\u5927\u5199=\u6545\u969c) ||\/ \u540d\u79f0 \u7248\u672c \u7b80\u4ecb 2 \u67e5\u8be2\u5df2\u5b89\u88c5\u7684\u6307\u5b9a\u8f6f\u4ef6\u5305\u7684\u8be6\u7ec6\u4fe1\u606f(dpkg -s) \u4f7f\u7528&quot;dpkg -s&quot;\u547d\u4ee4\u67e5\u8be2ssh\u8f6f\u4ef6\u5305\u7684\u8be6\u7ec6\u4fe1\u606f 3 \u67e5\u8be2\u7cfb\u7edf\u4e2d\u5df2\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305\u6240\u5b89\u88c5\u7684\u6587\u4ef6(dpkg -L) \u663e\u793a&quot;ssh&quot;\u8f6f\u4ef6\u5305\u5b89\u88c5\u5230\u7cfb\u7edf\u7684\u6587\u4ef6 debian:~# dpkg -L ssh \/. \/usr \/usr\/share \/usr\/share\/doc \/usr\/share\/doc\/openssh-client \/usr\/share\/doc\/ssh 4 \u67e5\u8be2\u7cfb\u7edf\u4e2d\u7684\u67d0\u4e2a\u6587\u4ef6\u5c5e\u4e8e\u54ea\u4e2a\u8f6f\u4ef6\u5305(dpkg -S) debian:~# dpkg -S \/etc\/init.d\/networking netbase: \/etc\/init.d\/networking \u6587\u4ef6&quot;\/etc\/init.d\/networking&quot;\u5c5e\u4e8e\u540d\u4e3a&quot;netbase&quot;\u7684\u8f6f\u4ef6\u5305\u3002 debian:~# dpkg &hellip; <a href=\"https:\/\/ykyi.net\/?p=940\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;dpkg\u7684\u4e00\u4e9b\u7528\u6cd5&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[25,51],"class_list":["post-940","post","type-post","status-publish","format-standard","hentry","category-tech_articles","tag-debian","tag-linux-2"],"_links":{"self":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/posts\/940","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=940"}],"version-history":[{"count":0,"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/posts\/940\/revisions"}],"wp:attachment":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=940"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=940"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=940"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}