{"id":52038,"date":"2024-12-03T09:17:37","date_gmt":"2024-12-03T01:17:37","guid":{"rendered":"https:\/\/fwq.ai\/blog\/52038\/"},"modified":"2024-12-03T09:17:37","modified_gmt":"2024-12-03T01:17:37","slug":"linux-pwd%e5%91%bd%e4%bb%a4%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/52038\/","title":{"rendered":"linux pwd\u547d\u4ee4\u5982\u4f55\u4f7f\u7528"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>linux pwd\u547d\u4ee4\u5982\u4f55\u4f7f\u7528<\/h1>\n<p>\u5b66\u4e60<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u6587\u7ae0<\/span>\u8981\u52aa\u529b\uff0c\u4f46\u662f\u4e0d\u8981\u6025\uff01\u4eca\u5929\u7684\u8fd9\u7bc7\u6587\u7ae0<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300alinux pwd\u547d\u4ee4\u5982\u4f55\u4f7f\u7528\u300b<\/span>\u5c06\u4f1a\u4ecb\u7ecd\u5230<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><\/span>\u7b49\u7b49\u77e5\u8bc6\u70b9\uff0c\u5982\u679c\u4f60\u60f3\u6df1\u5165\u5b66\u4e60<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u6587\u7ae0<\/span>\uff0c\u53ef\u4ee5\u5173\u6ce8\u6211\uff01\u6211\u4f1a\u6301\u7eed\u66f4\u65b0\u76f8\u5173\u6587\u7ae0\u7684\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u90fd\u80fd\u6709\u6240\u5e2e\u52a9\uff01<\/p>\n<p>linux\u4e2d\u7528 pwd \u547d\u4ee4\u6765\u67e5\u770b\u201d\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u201c\u7684\u5b8c\u6574\u8def\u5f84\u3002 \u7b80\u5355\u5f97\u8bf4\uff0c\u6bcf\u5f53\u4f60\u5728\u7ec8\u7aef\u8fdb\u884c\u64cd\u4f5c\u65f6\uff0c\u4f60\u90fd\u4f1a\u6709\u4e00\u4e2a\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u3002<br \/>\u5728\u4e0d\u592a\u786e\u5b9a\u5f53\u524d\u4f4d\u7f6e\u65f6\uff0c\u5c31\u4f1a\u4f7f\u7528pwd\u6765\u5224\u5b9a\u5f53\u524d\u76ee\u5f55\u5728\u6587\u4ef6\u7cfb\u7edf\u5185\u7684\u786e\u5207\u4f4d\u7f6e\u3002<\/p>\n<p><strong>1\uff0e\u547d\u4ee4\u683c\u5f0f\uff1a<\/strong><br \/>&nbsp;pwd [\u9009\u9879]<\/p>\n<p><strong>2\uff0e\u547d\u4ee4\u529f\u80fd\uff1a<\/strong><br \/>&nbsp;\u67e5\u770b\u201d\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u201c\u7684\u5b8c\u6574\u8def\u5f84<\/p>\n<p><strong>3\uff0e\u5e38\u7528\u53c2\u6570\uff1a<\/strong><br \/>\u4e00\u822c\u60c5\u51b5\u4e0b\u4e0d\u5e26\u4efb\u4f55\u53c2\u6570<br \/>\u5982\u679c\u76ee\u5f55\u662f\u94fe\u63a5\u65f6\uff1a<br \/>\u683c\u5f0f\uff1apwd -p&nbsp; \u663e\u793a\u51fa\u5b9e\u9645\u8def\u5f84\uff0c\u800c\u975e\u4f7f\u7528\u8fde\u63a5\uff08link\uff09\u8def\u5f84\u3002<\/p>\n<p><strong>4\uff0e\u5e38\u7528\u5b9e\u4f8b<\/strong>\uff1a<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u5b9e\u4f8b1\uff1a\u7528 pwd \u547d\u4ee4\u67e5\u770b\u9ed8\u8ba4\u5de5\u4f5c\u76ee\u5f55\u7684\u5b8c\u6574\u8def\u5f84<br \/>\u547d\u4ee4\uff1a<br \/>pwd<br \/>\u8f93\u51fa\uff1a<\/p>\n<p>\u590d\u5236\u4ee3\u7801&nbsp;\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>[root@localhost ~]# pwd<br \/>\/root<br \/>[root@localhost ~]#<\/p>\n<p>\u5b9e\u4f8b2\uff1a\u4f7f\u7528 pwd \u547d\u4ee4\u67e5\u770b\u6307\u5b9a\u6587\u4ef6\u5939<br \/>\u547d\u4ee4\uff1a<br \/>pwd<\/p>\n<p>\u590d\u5236\u4ee3\u7801&nbsp;\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>[root@localhost ~]# cd \/opt\/soft\/<br \/>[root@localhost soft]# pwd<br \/>\/opt\/soft<br \/>[root@localhost soft]#<\/p>\n<p>&nbsp;\u5b9e\u4f8b\u4e09\uff1a\u76ee\u5f55\u8fde\u63a5\u94fe\u63a5\u65f6\uff0cpwd -p&nbsp; \u663e\u793a\u51fa\u5b9e\u9645\u8def\u5f84\uff0c\u800c\u975e\u4f7f\u7528\u8fde\u63a5\uff08link\uff09\u8def\u5f84\uff1bpwd\u663e\u793a\u7684\u662f\u8fde\u63a5\u8def\u5f84<br \/>\u547d\u4ee4\uff1a<br \/>pwd -p<\/p>\n<p>\u590d\u5236\u4ee3\u7801&nbsp;\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>[root@localhost soft]# cd \/etc\/init.d<br \/>[root@localhost init.d]# pwd<br \/>\/etc\/init.d<br \/>[root@localhost init.d]# pwd -p<br \/>\/etc\/rc.d\/init.d<br \/>[root@localhost init.d]#<\/p>\n<p>&nbsp;\u5b9e\u4f8b4\uff1a\/bin\/pwd<br \/>\u547d\u4ee4\uff1a<br \/>\/bin\/pwd [\u9009\u9879]<br \/>\u9009\u9879\uff1a<br \/>-l \u76ee\u5f55\u8fde\u63a5\u94fe\u63a5\u65f6\uff0c\u8f93\u51fa\u8fde\u63a5\u8def\u5f84<br \/>-p \u8f93\u51fa\u7269\u7406\u8def\u5f84<br \/>\u8f93\u51fa\uff1a<\/p>\n<p>\u590d\u5236\u4ee3\u7801&nbsp;\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>[root@localhost init.d]# \/bin\/pwd<br \/>\/etc\/rc.d\/init.d<br \/>[root@localhost init.d]# \/bin\/pwd &#8211;help<br \/>[root@localhost init.d]# \/bin\/pwd -p<br \/>\/etc\/rc.d\/init.d<br \/>[root@localhost init.d]# \/bin\/pwd -l<br \/>\/etc\/init.d<br \/>[root@localhost init.d]#<\/p>\n<p>&nbsp;\u5b9e\u4f8b\u4e94\uff1a\u5f53\u524d\u76ee\u5f55\u88ab\u5220\u9664\u4e86\uff0c\u800cpwd\u547d\u4ee4\u4ecd\u7136\u663e\u793a\u90a3\u4e2a\u76ee\u5f55<\/p>\n<p>\u590d\u5236\u4ee3\u7801&nbsp;\u4ee3\u7801\u5982\u4e0b:<\/p>\n<p>[root@localhost init.d]# cd \/opt\/soft<br \/>[root@localhost soft]# mkdir removed<br \/>[root@localhost soft]# cd removed\/<br \/>[root@localhost removed]# pwd<br \/>\/opt\/soft\/removed<br \/>[root@localhost removed]# rm ..\/removed -rf<br \/>[root@localhost removed]# pwd<br \/>\/opt\/soft\/removed<br \/>[root@localhost removed]# \/bin\/pwd<br \/>\/bin\/pwd: couldn&#8217;t find directory entry in \u201c..\u201d with matching i-node<br \/>[root@localhost removed]# cd<br \/>[root@localhost ~]# pwd<br \/>\/root<br \/>[root@localhost ~]#<\/p>\n<p>\u6587\u4e2d\u5173\u4e8eLinux,pwd\u7684\u77e5\u8bc6\u4ecb\u7ecd\uff0c\u5e0c\u671b\u5bf9\u4f60\u7684\u5b66\u4e60\u6709\u6240\u5e2e\u52a9\uff01\u82e5\u662f\u53d7\u76ca\u532a\u6d45\uff0c\u90a3\u5c31\u52a8\u52a8\u9f20\u6807\u6536\u85cf\u8fd9\u7bc7\u300alinux pwd\u547d\u4ee4\u5982\u4f55\u4f7f\u7528\u300b\u6587\u7ae0\u5427\uff0c\u4e5f\u53ef\u5173\u6ce8\u7c73\u4e91\u516c\u4f17\u53f7\u4e86\u89e3\u76f8\u5173\u6280\u672f\u6587\u7ae0\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>linux pwd\u547d\u4ee4\u5982\u4f55\u4f7f\u7528 \u5b66\u4e60\u6587\u7ae0\u8981\u52aa\u529b\uff0c\u4f46\u662f\u4e0d\u8981\u6025\uff01\u4eca\u5929\u7684\u8fd9\u7bc7\u6587\u7ae0\u300alinux pwd\u547d\u4ee4\u5982\u4f55\u4f7f\u7528\u300b\u5c06\u4f1a\u4ecb\u7ecd\u5230\u7b49\u7b49\u77e5\u8bc6\u70b9\uff0c\u5982\u679c\u4f60\u60f3\u6df1\u5165\u5b66\u4e60\u6587\u7ae0\uff0c\u53ef\u4ee5\u5173\u6ce8\u6211\uff01\u6211\u4f1a\u6301\u7eed\u66f4\u65b0\u76f8\u5173\u6587\u7ae0\u7684\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u90fd\u80fd\u6709\u6240\u5e2e\u52a9\uff01 linux\u4e2d\u7528 pwd \u547d\u4ee4\u6765\u67e5\u770b\u201d\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u201c\u7684\u5b8c\u6574\u8def\u5f84\u3002 \u7b80\u5355\u5f97\u8bf4\uff0c\u6bcf\u5f53\u4f60\u5728\u7ec8\u7aef\u8fdb\u884c\u64cd\u4f5c\u65f6\uff0c\u4f60\u90fd\u4f1a\u6709\u4e00\u4e2a\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u3002\u5728\u4e0d\u592a\u786e\u5b9a\u5f53\u524d\u4f4d\u7f6e\u65f6\uff0c\u5c31\u4f1a\u4f7f\u7528pwd\u6765\u5224\u5b9a\u5f53\u524d\u76ee\u5f55\u5728\u6587\u4ef6\u7cfb\u7edf\u5185\u7684\u786e\u5207\u4f4d\u7f6e\u3002 1\uff0e\u547d\u4ee4\u683c\u5f0f\uff1a&nbsp;pwd [\u9009\u9879] 2\uff0e\u547d\u4ee4\u529f\u80fd\uff1a&nbsp;\u67e5\u770b\u201d\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u201c\u7684\u5b8c\u6574\u8def\u5f84 3\uff0e\u5e38\u7528\u53c2\u6570\uff1a\u4e00\u822c\u60c5\u51b5\u4e0b\u4e0d\u5e26\u4efb\u4f55\u53c2\u6570\u5982\u679c\u76ee\u5f55\u662f\u94fe\u63a5\u65f6\uff1a\u683c\u5f0f\uff1apwd -p&nbsp; \u663e\u793a\u51fa\u5b9e\u9645\u8def\u5f84\uff0c\u800c\u975e\u4f7f\u7528\u8fde\u63a5\uff08link\uff09\u8def\u5f84\u3002 4\uff0e\u5e38\u7528\u5b9e\u4f8b\uff1a&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u5b9e\u4f8b1\uff1a\u7528 pwd \u547d\u4ee4\u67e5\u770b\u9ed8\u8ba4\u5de5\u4f5c\u76ee\u5f55\u7684\u5b8c\u6574\u8def\u5f84\u547d\u4ee4\uff1apwd\u8f93\u51fa\uff1a \u590d\u5236\u4ee3\u7801&nbsp;\u4ee3\u7801\u5982\u4e0b: [root@localhost ~]# pwd\/root[root@localhost ~]# \u5b9e\u4f8b2\uff1a\u4f7f\u7528 pwd \u547d\u4ee4\u67e5\u770b\u6307\u5b9a\u6587\u4ef6\u5939\u547d\u4ee4\uff1apwd \u590d\u5236\u4ee3\u7801&nbsp;\u4ee3\u7801\u5982\u4e0b: [root@localhost ~]# cd \/opt\/soft\/[root@localhost soft]# pwd\/opt\/soft[root@localhost soft]# &nbsp;\u5b9e\u4f8b\u4e09\uff1a\u76ee\u5f55\u8fde\u63a5\u94fe\u63a5\u65f6\uff0cpwd -p&nbsp; \u663e\u793a\u51fa\u5b9e\u9645\u8def\u5f84\uff0c\u800c\u975e\u4f7f\u7528\u8fde\u63a5\uff08link\uff09\u8def\u5f84\uff1bpwd\u663e\u793a\u7684\u662f\u8fde\u63a5\u8def\u5f84\u547d\u4ee4\uff1apwd -p \u590d\u5236\u4ee3\u7801&nbsp;\u4ee3\u7801\u5982\u4e0b: [root@localhost soft]# cd \/etc\/init.d[root@localhost init.d]# pwd\/etc\/init.d[root@localhost init.d]# pwd -p\/etc\/rc.d\/init.d[root@localhost init.d]# &nbsp;\u5b9e\u4f8b4\uff1a\/bin\/pwd\u547d\u4ee4\uff1a\/bin\/pwd [\u9009\u9879]\u9009\u9879\uff1a-l \u76ee\u5f55\u8fde\u63a5\u94fe\u63a5\u65f6\uff0c\u8f93\u51fa\u8fde\u63a5\u8def\u5f84-p \u8f93\u51fa\u7269\u7406\u8def\u5f84\u8f93\u51fa\uff1a \u590d\u5236\u4ee3\u7801&nbsp;\u4ee3\u7801\u5982\u4e0b: [root@localhost [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-52038","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/52038","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=52038"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/52038\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=52038"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=52038"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=52038"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}