{"id":290564,"date":"2024-03-28T05:39:07","date_gmt":"2024-03-27T21:39:07","guid":{"rendered":"https:\/\/lrxjmw.cn\/lxtglzjjmzwp.html"},"modified":"2024-03-28T05:39:07","modified_gmt":"2024-03-27T21:39:07","slug":"lxtglzjjmzwp","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/lxtglzjjmzwp.html","title":{"rendered":"Linux\u7cfb\u7edf\u7ba1\u7406\u4e13\u5bb6\u63ed\u79d8\uff1a\u638c\u63e1pwd\u547d\u4ee4\uff0c\u8f7b\u677e\u5b9a\u4f4d\u5de5\u4f5c\u8def\u5f84"},"content":{"rendered":"
\u8eab\u4e3a\u8d44\u6df1Linux<\/a>\u7cfb\u7edf<\/a>\u7ba1\u7406\u4e13\u5bb6\uff0c\u5bf9Linux\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u7684\u5404\u7c7b\u5e38\u7528\u6307\u4ee4\u6211\u5df2\u719f\u7a14\u4e8e\u5fc3\u3002‘pwd’\u547d\u4ee4<\/a>\u8fd9\u4e00\u770b\u4f3c\u7b80\u6d01\u5b9e\u5219\u529f\u80fd\u5f3a\u5927\u7684\u5de5\u5177\uff0c\u5728\u6211\u4eec\u7684\u65e5\u5e38\u5b9e\u8df5\u4e2d\u5177\u6709\u4e3e\u8db3\u8f7b\u91cd\u7684\u5730\u4f4d\u3002\u672c\u6b21\u64b0\u6587\u9488\u5bf9‘pwd’\u547d\u4ee4\u5728\u8bf8\u591a\u5e94\u7528\u573a\u666f\u4ee5\u53ca\u4e0e\u4e4b\u76f8\u5173\u8054\u7684\u77e5\u8bc6\u70b9\u8fdb\u884c\u6df1\u5ea6\u5256\u6790\uff0c\u65e8\u5728\u5e2e\u52a9\u5404\u4f4d\u8bfb\u8005\u670b\u53cb\u66f4\u5168\u9762\u3001\u900f\u5f7b\u5730\u7406\u89e3\u5e76\u719f\u7ec3\u638c\u63e1\u8be5\u547d\u4ee4\u3002<\/p>\n \u4ec0\u4e48\u662fpwd\u547d\u4ee4\uff1f<\/b><\/p>\n \u5728\u8fdb\u4e00\u6b65\u7814\u7a76`pwd`\u6307\u4ee4\u4e4b\u524d\uff0c\u8ba9\u6211\u4eec\u9996\u5148\u4e86\u89e3\u5176\u57fa\u7840\u77e5\u8bc6\u3002\u8be5\u6307\u4ee4\u4ee3\u8868\"Print Working Directory\"\uff0c\u76f4\u8bd1\u4e3a\u8f93\u51fa\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u3002Linux\u7cfb\u7edf\u4e2d\u7684\u6bcf\u4e00\u4f4d\u7528\u6237\u90fd\u4f1a\u62e5\u6709\u81ea\u8eab\u7684\u5de5\u4f5c\u76ee\u5f55\uff0c\u4ea6\u79f0\u4f5c\u5de5\u4f5c\u8def\u5f84\uff0c\u5728\u6b64\u8fdb\u884c\u5404\u7c7b\u64cd\u4f5c\u3002\u800c`pwd`\u6b64\u6307\u4ee4\u6b63\u662f\u7528\u4e8e\u63ed\u793a\u7528\u6237\u5f53\u524d\u6240\u5728\u7684\u5de5\u4f5c\u76ee\u5f55\u5168\u8def\u5f84\u3002<\/p>\n \u5982\u4f55\u6b63\u786e\u4f7f\u7528pwd\u547d\u4ee4\uff1f<\/b><\/p>\n \u4f7f\u7528`pwd`\u6307\u4ee4\u6781\u5176\u7b80\u6613\uff0c\u4ec5\u9700\u4e8e\u7ec8\u7aef\u754c\u9762\u4e2d\u8f93\u5165\u6b64\u547d\u4ee4\u5e76\u6572\u51fb\u56de\u8f66\u952e\uff0c\u5373\u523b\u83b7\u53d6\u5230\u5f53\u524d\u76ee\u5f55\u7684\u8be6\u7ec6\u8def\u5f84\u4fe1\u606f\u3002\u8fd9\u4e3a\u4f7f\u7528\u8005\u5e26\u6765\u4e86\u6781\u5927\u4fbf\u5229\uff0c\u4f7f\u5f97\u5728\u590d\u6742\u7684\u6587\u4ef6\u7cfb\u7edf\u73af\u5883\u4e0b\u4ea6\u80fd\u51c6\u786e\u638c\u63e1\u81ea\u8eab\u6240\u5904\u7684\u786e\u5207\u4f4d\u7f6elinux\u5e38\u7528\u547d\u4ee4pwd<\/strong>linux\u5e38\u7528\u547d\u4ee4pwd<\/strong>\uff0c\u6709\u6548\u9632\u6b62\u8ff7\u8def\u56f0\u6270\u3002<\/p>\n \u4e3a\u4f55\u9700\u8981\u4e86\u89e3\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\uff1f<\/b><\/p>\n \u6e05\u6670\u660e\u4e86\u7684\u638c\u63e1\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u5bf9Linux\u7cfb\u7edf\u4f7f\u7528\u6781\u4e3a\u5173\u952e\u3002\u9996\u5148\uff0c\u67e5\u8be2\u5f53\u524d\u5de5\u4f5c\u5730\u70b9\u53ef\u4f7f\u4f7f\u7528\u8005\u660e\u786e\u6240\u5728\u4f4d\u7f6e\uff0c\u4ee5\u4fbf\u4e8e\u540e\u7eed\u64cd\u4f5c\uff1b\u5176\u6b21\uff0c\u64cd\u4f5c\u6587\u4ef6\u8def\u5f84\u3001\u66f4\u8fed\u8f6f\u94fe\u63a5\u7b49\u4e3e\u52a8\uff0c\u4ea6\u9700\u77e5\u6653\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u4ee5\u9632\u8bef\u5165\u6b67\u9014\u6216\u51fa\u73b0\u64cd\u4f5c\u5931\u8bef\uff1b\u6700\u540e\uff0c\u5236\u5b9a\u811a\u672c\u6216\u65bd\u884c\u4efb\u52a1\u65f6\uff0c\u786e\u5b9a\u5f53\u524d\u5b9a\u4f4d\u540c\u6837\u5fc5\u8981\u4ee5\u4fdd\u8bc1\u7a0b\u5e8f\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n <\/p>\n \u5982\u4f55\u8fdb\u4e00\u6b65\u5229\u7528pwd\u547d\u4ee4\uff1f<\/b><\/p>\n \u9664\u4e86\u63ed\u793a\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u8fd9\u4e00\u57fa\u672c\u529f\u80fd\uff0c`pwd`\u547d\u4ee4\u4ea6\u80fd\u901a\u8fc7\u6dfb\u52a0\u9009\u9879\u6765\u8fdb\u884c\u529f\u80fd\u62d3\u5c55\u3002\u6bd4\u5982\uff0c\u501f\u52a9`-P`\u9009\u9879\u53ef\u83b7\u6089\u7269\u7406\u8def\u5f84\u800c\u4e0d\u662f\u94fe\u63a5\u8def\u5f84\uff0c\u800c`-L`\u9009\u9879\u53c8\u80fd\u5c55\u793a\u51fa\u903b\u8f91\u8def\u5f84\u3002\u6b64\u5916\uff0c\u5728Shell\u811a\u672c\u7f16\u5199\u8fc7\u7a0b\u4e2dlinux\u547d\u4ee4chm\uff0c\u4ea6\u53ef\u5229\u7528\u53cd\u5f15\u53f7\u548c\u53d8\u91cf\u642d\u914d\uff0c\u4ee5\u5b9e\u73b0\u52a8\u6001\u83b7\u53d6\u4e0e\u5f15\u7528\u5f53\u524d\u8def\u5f84\u4fe1\u606f\u3002<\/p>\n \u5982\u4f55\u5feb\u901f\u5207\u6362\u76ee\u5f55\uff1f<\/b><\/p>\n <\/p>\n \u501f\u52a9`pwd`\u4ee5\u53caCD\u3001LS\u7b49\u57fa\u7840Linux\u547d\u4ee4\uff0c\u7528\u6237\u5f97\u4ee5\u8fc5\u901f\u5b8c\u6210\u4ece\u4e00\u4e2a\u76ee\u5f55\u81f3\u53e6\u4e00\u4e2a\u7684\u5feb\u79fb\u5e76\u5b9a\u4f4d\u3002\u4f8b\u5982linux\u8fd0\u7ef4\u535a\u5ba2\uff0c\u5f53\u9700\u5207\u6362\u81f3\u6307\u5b9a\u76ee\u5f55\u65f6\uff0c\u53ef\u5c1d\u8bd5\u8f93\u5165`cd $(pwd)`\u4ee5\u5373\u523b\u62b5\u8fbe\u73b0\u5904\u8def\u5f84\uff1b\u4ea6\u6216\u662f\u5c06\u5176\u4e0e\u5176\u5b83\u547d\u4ee4\u76f8\u4e92\u914d\u5408\uff0c\u5b9e\u73b0\u66f4\u4e3a\u9ad8\u7ea7\u7684\u8def\u5f84\u64cd\u4f5c\u3002<\/p>\n \u5982\u4f55\u5904\u7406\u6587\u4ef6\u8def\u5f84\u542b\u6709\u7a7a\u683c\u7b49\u7279\u6b8a\u5b57\u7b26\u7684\u60c5\u51b5\uff1f<\/b><\/p>\n \u5bf9\u4e8e\u5305\u542b\u7a7a\u683c\u6216\u7279\u6b8a\u7b26\u53f7\u7684\u6587\u4ef6\u8def\u5f84\uff0c\u5728\u5229\u7528`pwd`\u83b7\u53d6\u8def\u5f84\u4fe1\u606f\u65f6\u9700\u7279\u522b\u7559\u610f\u3002\u4e3a\u4e86\u907f\u514d\u56e0\u6b64\u7c7b\u5b57\u7b26\u5f15\u53d1\u7684\u9519\u8bef\uff0c\u5728\u7f16\u5199Shell\u811a\u672c\u65f6\u5e94\u6ce8\u91cd\u8def\u5f84\u5b57\u7b26\u4e32\u7684\u5904\u7406\u7b56\u7565\uff0c\u53ef\u91c7\u7528\u6807\u70b9\u53cc\u5f15\u53f7\u6765\u56fa\u5b9a\u8def\u5f84\uff0c\u786e\u4fdd\u51c6\u786e\u89e3\u6790\u3002<\/p>\n \u5982\u4f55\u7ed3\u5408\u5176\u4ed6\u547d\u4ee4\u8fdb\u884c\u64cd\u4f5c\uff1f<\/b><\/p>\n \u9664\u72ec\u7acb\u5e94\u7528\u4e4b\u5916\uff0c`pwd`\u547d\u4ee4\u53ef\u4e0e\u5176\u4ed6Linux\u6307\u4ee4\u76f8\u914d\u5408\u5b9e\u73b0\u4e30\u5bcc\u529f\u80fd\u3002\u4f8b\u5982\uff0c\u5728\u641c\u7d22\u6587\u4ef6\u3001\u521b\u5efa\u7b26\u53f7\u94fe\u63a5\u4ee5\u53ca\u5907\u4efd\u6570\u636e\u7b49\u8fc7\u7a0b\u4e2d\uff0c\u5148\u884c\u83b7\u53d6\u5e76\u5b58\u50a8\u5f53\u524d\u5de5\u4f5c\u8def\u5f84\u4fe1\u606f\uff0c\u7136\u540e\u518d\u5b9e\u65bd\u540e\u7eed\u52a8\u4f5c\uff0c\u8fd9\u79cd\u6280\u5de7\u9887\u4e3a\u5b9e\u7528\u3002<\/p>\n \u5982\u4f55\u5728Shell\u811a\u672c\u4e2d\u7075\u6d3b\u5e94\u7528\uff1f<\/b><\/p>\n <\/p>\n \u5bf9\u4e8e\u5a34\u719f\u7684Shell\u811a\u672c\u7a0b\u5e8f\u5458\u800c\u8a00\uff0c\u5982\u4f55\u5de7\u5999\u8fd0\u7528`pwd`\u547d\u4ee4\u5c24\u4e3a\u91cd\u8981\u3002\u901a\u8fc7\u638c\u63e1\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u4fe1\u606f\uff0c\u901a\u8fc7\u7efc\u5408\u8fd0\u7528\u6761\u4ef6\u5224\u65ad\u3001\u5faa\u73af\u7b49\u903b\u8f91\u6784\u9020\uff0c\u5f80\u5f80\u80fd\u5c55\u73b0\u51fa\u66f4\u52a0\u667a\u80fd\u5316\u4e0e\u591a\u6837\u5316\u7684\u811a\u672c\u529f\u80fd\u3002<\/p>\n \u5982\u4f55\u9632\u6b62\u8def\u5f84\u6ea2\u51fa\u653b\u51fb\uff1f<\/b><\/p>\n \u4e3a\u9632\u5907\u6076\u610f\u4eba\u5458\u5229\u7528\u7279\u6b8a\u8bbe\u8ba1\u7684\u5f31\u5f15\u7528\u8def\u5f84\u5b9e\u65bd\u8def\u5f84\u6ea2\u51fa\u653b\u51fb\uff0c\u5728\u5b9e\u8df5\u8fd0\u7528\u8fc7\u7a0b\u4e2d\u5fc5\u987b\u4e25\u683c\u63a7\u5236\u7528\u6237\u6743\u9650\u5e76\u786e\u4fdd\u8f93\u5165\u8f93\u51fa\u89c4\u8303\u5316\uff1b\u540c\u65f6\uff0c\u5b9a\u671f\u68c0\u67e5\u7cfb\u7edf\u5b89\u5168\u6f0f\u6d1e\u662f\u5fc5\u8981\u9632\u8303\u63aa\u65bd\u4e4b\u4e00\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" \u8eab\u4e3a\u8d44\u6df1Linux\u7cfb\u7edf\u7ba1\u7406\u4e13\u5bb6\uff0c\u5bf9Linux\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u7684\u5404\u7c7b\u5e38\u7528\u6307\u4ee4\u6211\u5df2\u719f\u7a14\u4e8e\u5fc3\u3002\u5728\u8fdb\u4e00\u6b65\u7814\u7a76`pwd`\u6307\u4ee4\u4e4b\u524d\uff0c\u8ba9\u6211\u4eec\u9996\u5148\u4e86\u89e3\u5176\u57fa\u7840\u77e5\u8bc6\u3002Linux\u7cfb\u7edf\u4e2d\u7684\u6bcf\u4e00\u4f4d\u7528\u6237\u90fd\u4f1a\u62e5\u6709\u81ea\u8eab\u7684\u5de5\u4f5c\u76ee\u5f55\uff0c\u4ea6\u79f0\u4f5c\u5de5\u4f5c\u8def\u5f84\uff0c\u5728\u6b64\u8fdb\u884c\u5404\u7c7b\u64cd\u4f5c\u3002\u6e05\u6670\u660e\u4e86\u7684\u638c\u63e1\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u5bf9Linux\u7cfb\u7edf\u4f7f\u7528\u6781\u4e3a\u5173\u952e\u3002<\/p>\n","protected":false},"author":1,"featured_media":290565,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-290564","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/290564","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=290564"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/290564\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/290565"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=290564"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=290564"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=290564"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}