{"id":2629,"date":"2016-03-05T15:05:20","date_gmt":"2016-03-05T07:05:20","guid":{"rendered":"http:\/\/ixyzero.com\/blog\/?p=2629"},"modified":"2016-03-05T15:05:20","modified_gmt":"2016-03-05T07:05:20","slug":"linux%e6%9f%a5%e7%9c%8b%e8%bf%9b%e7%a8%8b%e8%bf%90%e8%a1%8c%e5%ae%8c%e6%95%b4%e8%b7%af%e5%be%84%e7%9a%84%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/ixyzero.com\/blog\/archives\/2629.html","title":{"rendered":"Linux\u67e5\u770b\u8fdb\u7a0b\u8fd0\u884c\u5b8c\u6574\u8def\u5f84\u7684\u65b9\u6cd5"},"content":{"rendered":"<p>=Start=<\/p>\n<h6>\u7f18\u7531\uff1a<\/h6>\n<p>\u901a\u8fc7ps\u53catop\u547d\u4ee4\u67e5\u770b\u8fdb\u7a0b\u4fe1\u606f\u65f6\uff0c\u4e00\u822c\u53ea\u80fd\u67e5\u5230\u76f8\u5bf9\u8def\u5f84\uff0c\u67e5\u4e0d\u5230\u7684\u8fdb\u7a0b\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u5982\u7edd\u5bf9\u8def\u5f84\u7b49\u3002\u8fd9\u65f6\uff0c\u6211\u4eec\u9700\u8981\u901a\u8fc7\u4ee5\u4e0b\u7684\u65b9\u6cd5\u6765\u67e5\u770b\u8fdb\u7a0b\u7684\u8be6\u7ec6\u4fe1\u606f\u3002<\/p>\n<h6>\u53c2\u8003\u89e3\u7b54\uff1a<\/h6>\n<p>Linux\u5728\u542f\u52a8\u4e00\u4e2a\u8fdb\u7a0b\u65f6\uff0c\u7cfb\u7edf\u4f1a\u5728\/proc\u4e0b\u521b\u5efa\u4e00\u4e2a\u4ee5PID\u547d\u540d\u7684\u6587\u4ef6\u5939\uff0c\u5728\u8be5\u6587\u4ef6\u5939\u4e0b\u4f1a\u6709\u6211\u4eec\u7684\u8fdb\u7a0b\u7684\u4fe1\u606f\uff0c\u5176\u4e2d\u5305\u62ec\u4e00\u4e2a\u540d\u4e3aexe\u7684\u6587\u4ef6\u8bb0\u5f55\u4e86\u53ef\u6267\u884c\u6587\u4ef6\u7684\u7edd\u5bf9\u8def\u5f84 \u548c \u4e00\u4e2a\u540d\u4e3acwd\u7684\u6587\u4ef6\u8bb0\u5f55\u4e86\u5f53\u524d\u7684\u5de5\u4f5c\u76ee\u5f55\uff0c\u901a\u8fc7 ls -l \u547d\u4ee4\u5373\u53ef\u67e5\u770b\u3002<\/p>\n<pre class=\"lang:default decode:true\">\/proc\/PID\/exe\n\u00a0 \u00a0 Link to the executable of this process.\n\n\/proc\/PID\/cwd\n\u00a0 \u00a0 Link to the current working directory.<\/pre>\n<h6>\u53c2\u8003\u94fe\u63a5\uff1a<\/h6>\n<ul>\n<li><a href=\"http:\/\/lovesoo.org\/view-processes-running-linux-full-path-method.html\" target=\"_blank\">http:\/\/lovesoo.org\/view-processes-running-linux-full-path-method.html<\/a><\/li>\n<li><a href=\"http:\/\/unix.stackexchange.com\/questions\/141342\/proc-pid-cwd-is-there-a-posix-equivalent\" target=\"_blank\">http:\/\/unix.stackexchange.com\/questions\/141342\/proc-pid-cwd-is-there-a-posix-equivalent<\/a><\/li>\n<li><a href=\"http:\/\/serverfault.com\/questions\/66363\/environment-variables-of-a-running-process-on-unix\" target=\"_blank\">http:\/\/serverfault.com\/questions\/66363\/environment-variables-of-a-running-process-on-unix<\/a><\/li>\n<li><a href=\"http:\/\/www.cnblogs.com\/itech\/archive\/2012\/08\/29\/2662526.html\" target=\"_blank\">http:\/\/www.cnblogs.com\/itech\/archive\/2012\/08\/29\/2662526.html<\/a><\/li>\n<li><a href=\"http:\/\/www.ibm.com\/developerworks\/cn\/linux\/l-proc.html\" target=\"_blank\">http:\/\/www.ibm.com\/developerworks\/cn\/linux\/l-proc.html<\/a><\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Procfs\" target=\"_blank\">https:\/\/en.wikipedia.org\/wiki\/Procfs<\/a><\/li>\n<li><a href=\"http:\/\/www.tldp.org\/LDP\/Linux-Filesystem-Hierarchy\/html\/proc.html\" target=\"_blank\">http:\/\/www.tldp.org\/LDP\/Linux-Filesystem-Hierarchy\/html\/proc.html<\/a><\/li>\n<\/ul>\n<p>=END=<\/p>\n","protected":false},"excerpt":{"rendered":"<p>=Start= \u7f18\u7531\uff1a \u901a\u8fc7ps\u53catop\u547d\u4ee4\u67e5\u770b\u8fdb\u7a0b\u4fe1\u606f\u65f6\uff0c\u4e00\u822c\u53ea\u80fd\u67e5\u5230\u76f8\u5bf9\u8def\u5f84\uff0c\u67e5\u4e0d\u5230\u7684\u8fdb\u7a0b\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u5982\u7edd [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,11,7],"tags":[589,590,30,296,297],"class_list":["post-2629","post","type-post","status-publish","format-standard","hentry","category-knowledgebase-2","category-linux","category-programing","tag-proc","tag-cwd","tag-linux","tag-ps","tag-top"],"views":8370,"_links":{"self":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/2629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/comments?post=2629"}],"version-history":[{"count":0,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/2629\/revisions"}],"wp:attachment":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/media?parent=2629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/categories?post=2629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/tags?post=2629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}