{"id":145,"date":"2019-03-09T22:56:11","date_gmt":"2019-03-09T14:56:11","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=145"},"modified":"2022-05-06T17:28:33","modified_gmt":"2022-05-06T09:28:33","slug":"mkdir","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/mkdir","title":{"rendered":"mkdir\u547d\u4ee4 – \u521b\u5efa\u76ee\u5f55\u6587\u4ef6"},"content":{"rendered":"\n

mkdir\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201cmake directories\u201d\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u6765\u521b\u5efa\u76ee\u5f55\u6587\u4ef6\u3002\u4f7f\u7528\u7b80\u5355\uff0c\u4f46\u9700\u8981\u6ce8\u610f\u82e5\u8981\u521b\u5efa\u7684\u76ee\u6807\u76ee\u5f55\u5df2\u7ecf\u5b58\u5728\uff0c\u5219\u4f1a\u63d0\u793a\u5df2\u5b58\u5728\u800c\u4e0d\u7ee7\u7eed\u521b\u5efa\uff0c\u4e0d\u8986\u76d6\u5df2\u6709\u6587\u4ef6\u3002\u800c\u76ee\u5f55\u4e0d\u5b58\u5728\uff0c\u4f46\u5177\u6709\u5d4c\u5957\u7684\u4f9d\u8d56\u5173\u7cfb\uff0c\u4f8b\u5982a\/b\/c\/d\/e\/f\uff0c\u8981\u60f3\u4e00\u6b21\u6027\u521b\u5efa\u5219\u9700\u8981\u52a0\u5165-p\u53c2\u6570\uff0c\u8fdb\u884c\u9012\u5f52\u64cd\u4f5c\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f : <\/strong>mkdir [\u53c2\u6570] \u76ee\u5f55<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

-p<\/td>\u9012\u5f52\u521b\u5efa\u591a\u7ea7\u76ee\u5f55 <\/td><\/tr>
-m<\/td>\u5efa\u7acb\u76ee\u5f55\u7684\u540c\u65f6\u8bbe\u7f6e\u76ee\u5f55\u7684\u6743\u9650 <\/td><\/tr>
-z<\/td>\u8bbe\u7f6e\u5b89\u5168\u4e0a\u4e0b\u6587 <\/td><\/tr>
-v<\/td>\u663e\u793a\u76ee\u5f55\u7684\u521b\u5efa\u8fc7\u7a0b<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

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

\u5728\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u4e2d\uff0c\u5efa\u7acb\u4e00\u4e2a\u76ee\u5f55\u6587\u4ef6\uff1a <\/p>\n\n\n\n

[root@linuxcool ~]# mkdir dir1<\/strong><\/pre>\n\n\n\n

\u5728\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u4e2d\uff0c\u521b\u5efa\u4e00\u4e2a\u76ee\u5f55\u6587\u4ef6\u5e76\u8bbe\u7f6e700\u6743\u9650\uff0c\u4e0d\u8ba9\u9664\u6240\u6709\u4e3b\u4ee5\u5916\u4efb\u4f55\u4eba\u8bfb\u3001\u5199\u3001\u6267\u884c\u5b83\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# mkdir -m 700 dir2<\/strong><\/pre>\n\n\n\n

\u5728\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u4e2d\uff0c\u4e00\u6b21\u6027\u521b\u5efa\u591a\u4e2a\u76ee\u5f55\u6587\u4ef6\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# mkdir dir3 dir4 dir5<\/strong><\/pre>\n\n\n\n

\u5728\u7cfb\u7edf\u6839\u76ee\u5f55\u4e2d\uff0c\u4e00\u6b21\u6027\u521b\u5efa\u591a\u4e2a\u6709\u5d4c\u5957\u5173\u7cfb\u7684\u76ee\u5f55\u6587\u4ef6\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# mkdir -p \/dir1\/dir2\/dir3\/dir4\/dir5<\/strong><\/pre>\n","protected":false},"excerpt":{"rendered":"

mkdir\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201cmake directories\u201d\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u6765\u521b\u5efa\u76ee\u5f55\u6587\u4ef6\u3002\u4f7f\u7528\u7b80\u5355\uff0c\u4f46 […]<\/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\/145"}],"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=145"}],"version-history":[{"count":14,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/145\/revisions"}],"predecessor-version":[{"id":9324,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/145\/revisions\/9324"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}