{"id":73665,"date":"2026-02-08T03:49:26","date_gmt":"2026-02-07T19:49:26","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/73665.html"},"modified":"2026-02-08T03:49:26","modified_gmt":"2026-02-07T19:49:26","slug":"linux-%e6%96%87%e4%bb%b6%e4%b8%8e%e7%9b%ae%e5%bd%95%e7%ae%a1%e7%90%8665477","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/73665.html","title":{"rendered":"Linux \u6587\u4ef6\u4e0e\u76ee\u5f55\u7ba1\u740665477"},"content":{"rendered":"<h2>Linux\u00a0\u6587\u4ef6\u4e0e\u76ee\u5f55\u7ba1\u7406<\/h2>\n<p>\u6211\u4eec\u77e5\u9053 Linux \u7684\u76ee\u5f55\u7ed3\u6784\u4e3a\u6811\u72b6\u7ed3\u6784&#xff0c;\u6700\u9876\u7ea7\u7684\u76ee\u5f55\u4e3a\u6839\u76ee\u5f55\u00a0\/\u3002<\/p>\n<p>\u5176\u4ed6\u76ee\u5f55\u901a\u8fc7\u6302\u8f7d\u53ef\u4ee5\u5c06\u5b83\u4eec\u6dfb\u52a0\u5230\u6811\u4e2d&#xff0c;\u901a\u8fc7\u89e3\u9664\u6302\u8f7d\u53ef\u4ee5\u79fb\u9664\u5b83\u4eec\u3002<\/p>\n<p>\u5728\u5f00\u59cb\u672c\u6559\u7a0b\u524d\u6211\u4eec\u9700\u8981\u5148\u77e5\u9053\u4ec0\u4e48\u662f\u7edd\u5bf9\u8def\u5f84\u4e0e\u76f8\u5bf9\u8def\u5f84\u3002<\/p>\n<ul>\n<li>\n<p>\u7edd\u5bf9\u8def\u5f84&#xff1a;<br \/>\n\u8def\u5f84\u7684\u5199\u6cd5&#xff0c;\u7531\u6839\u76ee\u5f55\u00a0\/\u00a0\u5199\u8d77&#xff0c;\u4f8b\u5982&#xff1a; \/usr\/share\/doc \u8fd9\u4e2a\u76ee\u5f55\u3002<\/p>\n<\/li>\n<li>\n<p>\u76f8\u5bf9\u8def\u5f84&#xff1a;<br \/>\n\u8def\u5f84\u7684\u5199\u6cd5&#xff0c;\u4e0d\u662f\u7531\u00a0\/\u00a0\u5199\u8d77&#xff0c;\u4f8b\u5982\u7531 \/usr\/share\/doc \u8981\u5230 \/usr\/share\/man \u5e95\u4e0b\u65f6&#xff0c;\u53ef\u4ee5\u5199\u6210&#xff1a;\u00a0cd ..\/man\u00a0\u8fd9\u5c31\u662f\u76f8\u5bf9\u8def\u5f84\u7684\u5199\u6cd5\u3002<\/p>\n<\/li>\n<\/ul>\n<hr \/>\n<h3>\u5904\u7406\u76ee\u5f55\u7684\u5e38\u7528\u547d\u4ee4<\/h3>\n<p>\u63a5\u4e0b\u6765\u6211\u4eec\u5c31\u6765\u770b\u51e0\u4e2a\u5e38\u89c1\u7684\u5904\u7406\u76ee\u5f55\u7684\u547d\u4ee4\u5427&#xff1a;<\/p>\n<ul>\n<li>ls&#xff08;\u82f1\u6587\u5168\u62fc&#xff1a;list files&#xff09;: \u5217\u51fa\u76ee\u5f55\u53ca\u6587\u4ef6\u540d<\/li>\n<li>cd&#xff08;\u82f1\u6587\u5168\u62fc&#xff1a;change directory&#xff09;&#xff1a;\u5207\u6362\u76ee\u5f55<\/li>\n<li>pwd&#xff08;\u82f1\u6587\u5168\u62fc&#xff1a;print work directory&#xff09;&#xff1a;\u663e\u793a\u76ee\u524d\u7684\u76ee\u5f55<\/li>\n<li>mkdir&#xff08;\u82f1\u6587\u5168\u62fc&#xff1a;make directory&#xff09;&#xff1a;\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u76ee\u5f55<\/li>\n<li>rmdir&#xff08;\u82f1\u6587\u5168\u62fc&#xff1a;remove directory&#xff09;&#xff1a;\u5220\u9664\u4e00\u4e2a\u7a7a\u7684\u76ee\u5f55<\/li>\n<li>cp&#xff08;\u82f1\u6587\u5168\u62fc&#xff1a;copy file&#xff09;: \u590d\u5236\u6587\u4ef6\u6216\u76ee\u5f55<\/li>\n<li>rm&#xff08;\u82f1\u6587\u5168\u62fc&#xff1a;remove&#xff09;: \u5220\u9664\u6587\u4ef6\u6216\u76ee\u5f55<\/li>\n<li>mv&#xff08;\u82f1\u6587\u5168\u62fc&#xff1a;move file&#xff09;: \u79fb\u52a8\u6587\u4ef6\u4e0e\u76ee\u5f55&#xff0c;\u6216\u4fee\u6539\u6587\u4ef6\u4e0e\u76ee\u5f55\u7684\u540d\u79f0<\/li>\n<\/ul>\n<p>\u4f60\u53ef\u4ee5\u4f7f\u7528\u00a0man [\u547d\u4ee4]\u00a0\u6765\u67e5\u770b\u5404\u4e2a\u547d\u4ee4\u7684\u4f7f\u7528\u6587\u6863&#xff0c;\u5982 &#xff1a;man cp\u3002<\/p>\n<h4>ls (\u5217\u51fa\u76ee\u5f55)<\/h4>\n<p>\u5728Linux\u7cfb\u7edf\u5f53\u4e2d&#xff0c; ls \u547d\u4ee4\u53ef\u80fd\u662f\u6700\u5e38\u88ab\u8fd0\u884c\u7684\u3002<\/p>\n<p>\u8bed\u6cd5&#xff1a;<\/p>\n<p>[root&#064;www ~]# ls [-aAdfFhilnrRSt] \u76ee\u5f55\u540d\u79f0<br \/>\n[root&#064;www ~]# ls [&#8211;color&#061;{never,auto,always}] \u76ee\u5f55\u540d\u79f0<br \/>\n[root&#064;www ~]# ls [&#8211;full-time] \u76ee\u5f55\u540d\u79f0<\/p>\n<p>\u9009\u9879\u4e0e\u53c2\u6570&#xff1a;<\/p>\n<ul>\n<li>-a &#xff1a;\u5168\u90e8\u7684\u6587\u4ef6&#xff0c;\u8fde\u540c\u9690\u85cf\u6587\u4ef6( \u5f00\u5934\u4e3a . \u7684\u6587\u4ef6) \u4e00\u8d77\u5217\u51fa\u6765(\u5e38\u7528)<\/li>\n<li>-d &#xff1a;\u4ec5\u5217\u51fa\u76ee\u5f55\u672c\u8eab&#xff0c;\u800c\u4e0d\u662f\u5217\u51fa\u76ee\u5f55\u5185\u7684\u6587\u4ef6\u6570\u636e(\u5e38\u7528)<\/li>\n<li>-l &#xff1a;\u957f\u6570\u636e\u4e32\u5217\u51fa&#xff0c;\u5305\u542b\u6587\u4ef6\u7684\u5c5e\u6027\u4e0e\u6743\u9650\u7b49\u7b49\u6570\u636e&#xff1b;(\u5e38\u7528)<\/li>\n<\/ul>\n<p>\u5c06\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\u5217\u51fa\u6765(\u542b\u5c5e\u6027\u4e0e\u9690\u85cf\u6863)<\/p>\n<p>[root&#064;www ~]# ls -al ~<\/p>\n<h4>cd (\u5207\u6362\u76ee\u5f55)<\/h4>\n<p>cd\u662fChange Directory\u7684\u7f29\u5199&#xff0c;\u8fd9\u662f\u7528\u6765\u53d8\u6362\u5de5\u4f5c\u76ee\u5f55\u7684\u547d\u4ee4\u3002<\/p>\n<p>\u8bed\u6cd5&#xff1a;<\/p>\n<p> cd [\u76f8\u5bf9\u8def\u5f84\u6216\u7edd\u5bf9\u8def\u5f84]<\/p>\n<p>#\u4f7f\u7528 mkdir \u547d\u4ee4\u521b\u5efa runoob \u76ee\u5f55<br \/>\n[root&#064;www ~]# mkdir runoob<\/p>\n<p>#\u4f7f\u7528\u7edd\u5bf9\u8def\u5f84\u5207\u6362\u5230 runoob \u76ee\u5f55<br \/>\n[root&#064;www ~]# cd \/root\/runoob\/<\/p>\n<p>#\u4f7f\u7528\u76f8\u5bf9\u8def\u5f84\u5207\u6362\u5230 runoob \u76ee\u5f55<br \/>\n[root&#064;www ~]# cd .\/runoob\/<\/p>\n<p># \u8868\u793a\u56de\u5230\u81ea\u5df1\u7684\u5bb6\u76ee\u5f55&#xff0c;\u4ea6\u5373\u662f \/root \u8fd9\u4e2a\u76ee\u5f55<br \/>\n[root&#064;www runoob]# cd ~<\/p>\n<p># \u8868\u793a\u53bb\u5230\u76ee\u524d\u7684\u4e0a\u4e00\u7ea7\u76ee\u5f55&#xff0c;\u4ea6\u5373\u662f \/root \u7684\u4e0a\u4e00\u7ea7\u76ee\u5f55\u7684\u610f\u601d&#xff1b;<br \/>\n[root&#064;www ~]# cd ..<\/p>\n<p>\u63a5\u4e0b\u6765\u5927\u5bb6\u591a\u64cd\u4f5c\u51e0\u6b21\u5e94\u8be5\u5c31\u53ef\u4ee5\u5f88\u597d\u7684\u7406\u89e3 cd \u547d\u4ee4\u7684\u3002<\/p>\n<h4>pwd (\u663e\u793a\u76ee\u524d\u6240\u5728\u7684\u76ee\u5f55)<\/h4>\n<p>pwd \u662f\u00a0Print Working Directory\u00a0\u7684\u7f29\u5199&#xff0c;\u4e5f\u5c31\u662f\u663e\u793a\u76ee\u524d\u6240\u5728\u76ee\u5f55\u7684\u547d\u4ee4\u3002<\/p>\n<p>[root&#064;www ~]# pwd [-P]<\/p>\n<p>\u9009\u9879\u4e0e\u53c2\u6570&#xff1a;<\/p>\n<ul>\n<li>-P\u00a0&#xff1a;\u663e\u793a\u51fa\u786e\u5b9e\u7684\u8def\u5f84&#xff0c;\u800c\u975e\u4f7f\u7528\u94fe\u63a5 (link) \u8def\u5f84\u3002<\/li>\n<\/ul>\n<p>\u5b9e\u4f8b&#xff1a;\u5355\u7eaf\u663e\u793a\u51fa\u76ee\u524d\u7684\u5de5\u4f5c\u76ee\u5f55&#xff1a;<\/p>\n<p>[root&#064;www ~]# pwd<br \/>\n\/root   &lt;&#061;&#061; \u663e\u793a\u51fa\u76ee\u5f55\u5566&#xff5e;<\/p>\n<p>\u5b9e\u4f8b\u663e\u793a\u51fa\u5b9e\u9645\u7684\u5de5\u4f5c\u76ee\u5f55&#xff0c;\u800c\u975e\u94fe\u63a5\u6863\u672c\u8eab\u7684\u76ee\u5f55\u540d\u800c\u5df2\u3002<\/p>\n<p>[root&#064;www ~]# cd \/var\/mail   &lt;&#061;&#061;\u6ce8\u610f&#xff0c;\/var\/mail\u662f\u4e00\u4e2a\u94fe\u63a5\u6863<br \/>\n[root&#064;www mail]# pwd<br \/>\n\/var\/mail         &lt;&#061;&#061;\u5217\u51fa\u76ee\u524d\u7684\u5de5\u4f5c\u76ee\u5f55<br \/>\n[root&#064;www mail]# pwd -P<br \/>\n\/var\/spool\/mail   &lt;&#061;&#061;\u600e\u4e48\u56de\u4e8b&#xff1f;\u6709\u6ca1\u6709\u52a0 -P \u5dee\u5f88\u591a&#xff5e;<br \/>\n[root&#064;www mail]# ls -ld \/var\/mail<br \/>\nlrwxrwxrwx 1 root root 10 Sep  4 17:54 \/var\/mail -&gt; spool\/mail<br \/>\n# \u770b\u5230\u8fd9\u91cc\u5e94\u8be5\u77e5\u9053\u4e3a\u5565\u4e86\u5427&#xff1f;\u56e0\u4e3a \/var\/mail \u662f\u94fe\u63a5\u6863&#xff0c;\u94fe\u63a5\u5230 \/var\/spool\/mail<br \/>\n# \u6240\u4ee5&#xff0c;\u52a0\u4e0a pwd -P \u7684\u9009\u9879\u540e&#xff0c;\u4f1a\u4e0d\u4ee5\u94fe\u63a5\u6863\u7684\u6570\u636e\u663e\u793a&#xff0c;\u800c\u662f\u663e\u793a\u6b63\u786e\u7684\u5b8c\u6574\u8def\u5f84\u554a&#xff01;<\/p>\n<h4>mkdir (\u521b\u5efa\u65b0\u76ee\u5f55)<\/h4>\n<p>\u5982\u679c\u60f3\u8981\u521b\u5efa\u65b0\u7684\u76ee\u5f55\u7684\u8bdd&#xff0c;\u90a3\u4e48\u5c31\u4f7f\u7528mkdir (make directory)\u5427\u3002<\/p>\n<p>\u8bed\u6cd5&#xff1a;<\/p>\n<p>mkdir [-mp] \u76ee\u5f55\u540d\u79f0<\/p>\n<p>\u9009\u9879\u4e0e\u53c2\u6570&#xff1a;<\/p>\n<ul>\n<li>-m &#xff1a;\u914d\u7f6e\u6587\u4ef6\u7684\u6743\u9650\u5594&#xff01;\u76f4\u63a5\u914d\u7f6e&#xff0c;\u4e0d\u9700\u8981\u770b\u9ed8\u8ba4\u6743\u9650 (umask) \u7684\u8138\u8272&#xff5e;<\/li>\n<li>-p &#xff1a;\u5e2e\u52a9\u4f60\u76f4\u63a5\u5c06\u6240\u9700\u8981\u7684\u76ee\u5f55(\u5305\u542b\u4e0a\u4e00\u7ea7\u76ee\u5f55)\u9012\u5f52\u521b\u5efa\u8d77\u6765&#xff01;<\/li>\n<\/ul>\n<p>\u5b9e\u4f8b&#xff1a;\u8bf7\u5230\/tmp\u5e95\u4e0b\u5c1d\u8bd5\u521b\u5efa\u6570\u4e2a\u65b0\u76ee\u5f55\u770b\u770b&#xff1a;<\/p>\n<p>[root&#064;www ~]# cd \/tmp<br \/>\n[root&#064;www tmp]# mkdir test    &lt;&#061;&#061;\u521b\u5efa\u4e00\u540d\u4e3a test \u7684\u65b0\u76ee\u5f55<br \/>\n[root&#064;www tmp]# mkdir test1\/test2\/test3\/test4<br \/>\nmkdir: cannot create directory &#096;test1\/test2\/test3\/test4&#039;:<br \/>\nNo such file or directory       &lt;&#061;&#061; \u6ca1\u529e\u6cd5\u76f4\u63a5\u521b\u5efa\u6b64\u76ee\u5f55\u554a&#xff01;<br \/>\n[root&#064;www tmp]# mkdir -p test1\/test2\/test3\/test4<\/p>\n<p>\u52a0\u4e86\u8fd9\u4e2a -p \u7684\u9009\u9879&#xff0c;\u53ef\u4ee5\u81ea\u884c\u5e2e\u4f60\u521b\u5efa\u591a\u5c42\u76ee\u5f55&#xff01;<\/p>\n<p>\u5b9e\u4f8b&#xff1a;\u521b\u5efa\u6743\u9650\u4e3a\u00a0rwx&#8211;x&#8211;x\u00a0\u7684\u76ee\u5f55\u3002<\/p>\n<p>[root&#064;www tmp]# mkdir -m 711 test2<br \/>\n[root&#064;www tmp]# ls -l<br \/>\ndrwxr-xr-x  3 root  root 4096 Jul 18 12:50 test<br \/>\ndrwxr-xr-x  3 root  root 4096 Jul 18 12:53 test1<br \/>\ndrwx&#8211;x&#8211;x  2 root  root 4096 Jul 18 12:54 test2<\/p>\n<p>https:\/\/avg.163.com\/topic\/detail\/10784209<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784200<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784199<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784198<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784197<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784187<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784186<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784185<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784183<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784184<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784173<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784171<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784170<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784160<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784159<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784149<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784148<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784147<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784146<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784145<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784144<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784143<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784142<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784132<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784131<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784130<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784129<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784119<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784118<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784116<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784117<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784107<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784105<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784104<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784103<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784093<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784092<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784091<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784081<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784080<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784079<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784078<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784077<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784076<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784075<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784074<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784073<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784072<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784070<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784068<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784067<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784066<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784065<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784063<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784062<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784061<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784060<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784059<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784058<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784057<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784056<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784055<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784054<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784053<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784051<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784050<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784049<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784048<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784047<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784046<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784044<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784043<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784042<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784041<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784040<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784039<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784038<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784037<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784035<br \/>\nhttps:\/\/avg.163.com\/topic\/detail\/10784036<br \/>\n\u00a0<\/p>\n<p>\u4e0a\u9762\u7684\u6743\u9650\u90e8\u5206&#xff0c;\u5982\u679c\u6ca1\u6709\u52a0\u4e0a -m \u6765\u5f3a\u5236\u914d\u7f6e\u5c5e\u6027&#xff0c;\u7cfb\u7edf\u4f1a\u4f7f\u7528\u9ed8\u8ba4\u5c5e\u6027\u3002<\/p>\n<p>\u5982\u679c\u6211\u4eec\u4f7f\u7528 -m &#xff0c;\u5982\u4e0a\u4f8b\u6211\u4eec\u7ed9\u4e88 -m 711 \u6765\u7ed9\u4e88\u65b0\u7684\u76ee\u5f55 drwx&#8211;x&#8211;x \u7684\u6743\u9650\u3002<\/p>\n<h4>rmdir (\u5220\u9664\u7a7a\u7684\u76ee\u5f55)<\/h4>\n<p>\u8bed\u6cd5&#xff1a;<\/p>\n<p> rmdir [-p] \u76ee\u5f55\u540d\u79f0<\/p>\n<p>\u9009\u9879\u4e0e\u53c2\u6570&#xff1a;<\/p>\n<ul>\n<li>-p &#xff1a;\u4ece\u8be5\u76ee\u5f55\u8d77&#xff0c;\u4e00\u6b21\u5220\u9664\u591a\u7ea7\u7a7a\u76ee\u5f55<\/li>\n<\/ul>\n<p>\u5220\u9664 runoob \u76ee\u5f55<\/p>\n<p>[root&#064;www tmp]# rmdir runoob\/<\/p>\n<p>\u5c06 mkdir \u5b9e\u4f8b\u4e2d\u521b\u5efa\u7684\u76ee\u5f55(\/tmp \u5e95\u4e0b)\u5220\u9664\u6389&#xff01;<\/p>\n<p>[root&#064;www tmp]# ls -l   &lt;&#061;&#061;\u770b\u770b\u6709\u591a\u5c11\u76ee\u5f55\u5b58\u5728&#xff1f;<br \/>\ndrwxr-xr-x  3 root  root 4096 Jul 18 12:50 test<br \/>\ndrwxr-xr-x  3 root  root 4096 Jul 18 12:53 test1<br \/>\ndrwx&#8211;x&#8211;x  2 root  root 4096 Jul 18 12:54 test2<br \/>\n[root&#064;www tmp]# rmdir test   &lt;&#061;&#061;\u53ef\u76f4\u63a5\u5220\u9664\u6389&#xff0c;\u6ca1\u95ee\u9898<br \/>\n[root&#064;www tmp]# rmdir test1  &lt;&#061;&#061;\u56e0\u4e3a\u5c1a\u6709\u5185\u5bb9&#xff0c;\u6240\u4ee5\u65e0\u6cd5\u5220\u9664&#xff01;<br \/>\nrmdir: &#096;test1&#039;: Directory not empty<br \/>\n[root&#064;www tmp]# rmdir -p test1\/test2\/test3\/test4<br \/>\n[root&#064;www tmp]# ls -l        &lt;&#061;&#061;\u60a8\u770b\u770b&#xff0c;\u5e95\u4e0b\u7684\u8f93\u51fa\u4e2dtest\u4e0etest1\u4e0d\u89c1\u4e86&#xff01;<br \/>\ndrwx&#8211;x&#8211;x  2 root  root 4096 Jul 18 12:54 test2<\/p>\n<p>\u5229\u7528 -p \u8fd9\u4e2a\u9009\u9879&#xff0c;\u7acb\u523b\u5c31\u53ef\u4ee5\u5c06 test1\/test2\/test3\/test4 \u4e00\u6b21\u5220\u9664\u3002<\/p>\n<p>\u4e0d\u8fc7\u8981\u6ce8\u610f\u7684\u662f&#xff0c;\u8fd9\u4e2a rmdir \u4ec5\u80fd\u5220\u9664\u7a7a\u7684\u76ee\u5f55&#xff0c;\u4f60\u53ef\u4ee5\u4f7f\u7528 rm \u547d\u4ee4\u6765\u5220\u9664\u975e\u7a7a\u76ee\u5f55\u3002<\/p>\n<h4>cp (\u590d\u5236\u6587\u4ef6\u6216\u76ee\u5f55)<\/h4>\n<p>cp \u5373\u62f7\u8d1d\u6587\u4ef6\u548c\u76ee\u5f55\u3002<\/p>\n<p>\u8bed\u6cd5:<\/p>\n<p>[root&#064;www ~]# cp [-adfilprsu] \u6765\u6e90\u6863(source) \u76ee\u6807\u6863(destination)<br \/>\n[root&#064;www ~]# cp [options] source1 source2 source3 &#8230;. directory<\/p>\n<p>\u9009\u9879\u4e0e\u53c2\u6570&#xff1a;<\/p>\n<ul>\n<li>\n<p>-a&#xff1a;\u76f8\u5f53\u65bc -pdr \u7684\u610f\u601d&#xff0c;\u81f3\u65bc pdr \u8bf7\u53c2\u8003\u4e0b\u5217\u8bf4\u660e&#xff1b;(\u5e38\u7528)<\/p>\n<\/li>\n<li>\n<p>-d&#xff1a;\u82e5\u6765\u6e90\u6863\u4e3a\u94fe\u63a5\u6863\u7684\u5c5e\u6027(link file)&#xff0c;\u5219\u590d\u5236\u94fe\u63a5\u6863\u5c5e\u6027\u800c\u975e\u6587\u4ef6\u672c\u8eab&#xff1b;<\/p>\n<\/li>\n<li>\n<p>-f&#xff1a;\u4e3a\u5f3a\u5236(force)\u7684\u610f\u601d&#xff0c;\u82e5\u76ee\u6807\u6587\u4ef6\u5df2\u7ecf\u5b58\u5728\u4e14\u65e0\u6cd5\u5f00\u542f&#xff0c;\u5219\u79fb\u9664\u540e\u518d\u5c1d\u8bd5\u4e00\u6b21&#xff1b;<\/p>\n<\/li>\n<li>\n<p>-i&#xff1a;\u82e5\u76ee\u6807\u6863(destination)\u5df2\u7ecf\u5b58\u5728\u65f6&#xff0c;\u5728\u8986\u76d6\u65f6\u4f1a\u5148\u8be2\u95ee\u52a8\u4f5c\u7684\u8fdb\u884c(\u5e38\u7528)<\/p>\n<\/li>\n<li>\n<p>-l&#xff1a;\u8fdb\u884c\u786c\u5f0f\u94fe\u63a5(hard link)\u7684\u94fe\u63a5\u6863\u521b\u5efa&#xff0c;\u800c\u975e\u590d\u5236\u6587\u4ef6\u672c\u8eab&#xff1b;<\/p>\n<\/li>\n<li>\n<p>-p&#xff1a;\u8fde\u540c\u6587\u4ef6\u7684\u5c5e\u6027\u4e00\u8d77\u590d\u5236\u8fc7\u53bb&#xff0c;\u800c\u975e\u4f7f\u7528\u9ed8\u8ba4\u5c5e\u6027(\u5907\u4efd\u5e38\u7528)&#xff1b;<\/p>\n<\/li>\n<li>\n<p>-r&#xff1a;\u9012\u5f52\u6301\u7eed\u590d\u5236&#xff0c;\u7528\u65bc\u76ee\u5f55\u7684\u590d\u5236\u884c\u4e3a&#xff1b;(\u5e38\u7528)<\/p>\n<\/li>\n<li>\n<p>-s&#xff1a;\u590d\u5236\u6210\u4e3a\u7b26\u53f7\u94fe\u63a5\u6863 (symbolic link)&#xff0c;\u4ea6\u5373\u300e\u6377\u5f84\u300f\u6587\u4ef6&#xff1b;<\/p>\n<\/li>\n<li>\n<p>-u&#xff1a;\u82e5 destination \u6bd4 source \u65e7\u624d\u5347\u7ea7 destination &#xff01;<\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Linux\u00a0\u6587\u4ef6\u4e0e\u76ee\u5f55\u7ba1\u7406\u6211\u4eec\u77e5\u9053 Linux \u7684\u76ee\u5f55\u7ed3\u6784\u4e3a\u6811\u72b6\u7ed3\u6784&#xff0c;\u6700\u9876\u7ea7\u7684\u76ee\u5f55\u4e3a\u6839\u76ee\u5f55\u00a0\/\u3002\u5176\u4ed6\u76ee\u5f55\u901a\u8fc7\u6302\u8f7d\u53ef\u4ee5\u5c06\u5b83\u4eec\u6dfb\u52a0\u5230\u6811\u4e2d&#xff0c;\u901a\u8fc7\u89e3\u9664\u6302\u8f7d\u53ef\u4ee5\u79fb\u9664\u5b83\u4eec\u3002\u5728\u5f00\u59cb\u672c\u6559\u7a0b\u524d\u6211\u4eec\u9700\u8981\u5148\u77e5\u9053\u4ec0\u4e48\u662f\u7edd\u5bf9\u8def\u5f84\u4e0e\u76f8\u5bf9\u8def\u5f84\u3002\u7edd\u5bf9\u8def\u5f84&#xff1a;<br \/>\n\u8def\u5f84\u7684\u5199\u6cd5&#xff0c;\u7531\u6839\u76ee\u5f55\u00a0\/\u00a0\u5199\u8d77&#xff0c;\u4f8b\u5982&#xff1a; \/usr\/share\/doc \u8fd9\u4e2a\u76ee\u5f55\u3002\u76f8\u5bf9\u8def\u5f84&#xff1a;<br \/>\n\u8def\u5f84\u7684\u5199\u6cd5&#xff0c;\u4e0d\u662f\u7531\u00a0\/\u00a0\u5199\u8d77&#xff0c;\u4f8b\u5982\u7531<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,43,44],"topic":[],"class_list":["post-73665","post","type-post","status-publish","format-standard","hentry","category-server","tag-linux","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux \u6587\u4ef6\u4e0e\u76ee\u5f55\u7ba1\u740665477 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/73665.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux \u6587\u4ef6\u4e0e\u76ee\u5f55\u7ba1\u740665477 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"Linux\u00a0\u6587\u4ef6\u4e0e\u76ee\u5f55\u7ba1\u7406\u6211\u4eec\u77e5\u9053 Linux \u7684\u76ee\u5f55\u7ed3\u6784\u4e3a\u6811\u72b6\u7ed3\u6784&#xff0c;\u6700\u9876\u7ea7\u7684\u76ee\u5f55\u4e3a\u6839\u76ee\u5f55\u00a0\/\u3002\u5176\u4ed6\u76ee\u5f55\u901a\u8fc7\u6302\u8f7d\u53ef\u4ee5\u5c06\u5b83\u4eec\u6dfb\u52a0\u5230\u6811\u4e2d&#xff0c;\u901a\u8fc7\u89e3\u9664\u6302\u8f7d\u53ef\u4ee5\u79fb\u9664\u5b83\u4eec\u3002\u5728\u5f00\u59cb\u672c\u6559\u7a0b\u524d\u6211\u4eec\u9700\u8981\u5148\u77e5\u9053\u4ec0\u4e48\u662f\u7edd\u5bf9\u8def\u5f84\u4e0e\u76f8\u5bf9\u8def\u5f84\u3002\u7edd\u5bf9\u8def\u5f84&#xff1a; \u8def\u5f84\u7684\u5199\u6cd5&#xff0c;\u7531\u6839\u76ee\u5f55\u00a0\/\u00a0\u5199\u8d77&#xff0c;\u4f8b\u5982&#xff1a; \/usr\/share\/doc \u8fd9\u4e2a\u76ee\u5f55\u3002\u76f8\u5bf9\u8def\u5f84&#xff1a; \u8def\u5f84\u7684\u5199\u6cd5&#xff0c;\u4e0d\u662f\u7531\u00a0\/\u00a0\u5199\u8d77&#xff0c;\u4f8b\u5982\u7531\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/73665.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-07T19:49:26+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/73665.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/73665.html\",\"name\":\"Linux \u6587\u4ef6\u4e0e\u76ee\u5f55\u7ba1\u740665477 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-02-07T19:49:26+00:00\",\"dateModified\":\"2026-02-07T19:49:26+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/73665.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/73665.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/73665.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux \u6587\u4ef6\u4e0e\u76ee\u5f55\u7ba1\u740665477\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux \u6587\u4ef6\u4e0e\u76ee\u5f55\u7ba1\u740665477 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/73665.html","og_locale":"zh_CN","og_type":"article","og_title":"Linux \u6587\u4ef6\u4e0e\u76ee\u5f55\u7ba1\u740665477 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"Linux\u00a0\u6587\u4ef6\u4e0e\u76ee\u5f55\u7ba1\u7406\u6211\u4eec\u77e5\u9053 Linux \u7684\u76ee\u5f55\u7ed3\u6784\u4e3a\u6811\u72b6\u7ed3\u6784&#xff0c;\u6700\u9876\u7ea7\u7684\u76ee\u5f55\u4e3a\u6839\u76ee\u5f55\u00a0\/\u3002\u5176\u4ed6\u76ee\u5f55\u901a\u8fc7\u6302\u8f7d\u53ef\u4ee5\u5c06\u5b83\u4eec\u6dfb\u52a0\u5230\u6811\u4e2d&#xff0c;\u901a\u8fc7\u89e3\u9664\u6302\u8f7d\u53ef\u4ee5\u79fb\u9664\u5b83\u4eec\u3002\u5728\u5f00\u59cb\u672c\u6559\u7a0b\u524d\u6211\u4eec\u9700\u8981\u5148\u77e5\u9053\u4ec0\u4e48\u662f\u7edd\u5bf9\u8def\u5f84\u4e0e\u76f8\u5bf9\u8def\u5f84\u3002\u7edd\u5bf9\u8def\u5f84&#xff1a; \u8def\u5f84\u7684\u5199\u6cd5&#xff0c;\u7531\u6839\u76ee\u5f55\u00a0\/\u00a0\u5199\u8d77&#xff0c;\u4f8b\u5982&#xff1a; \/usr\/share\/doc \u8fd9\u4e2a\u76ee\u5f55\u3002\u76f8\u5bf9\u8def\u5f84&#xff1a; \u8def\u5f84\u7684\u5199\u6cd5&#xff0c;\u4e0d\u662f\u7531\u00a0\/\u00a0\u5199\u8d77&#xff0c;\u4f8b\u5982\u7531","og_url":"https:\/\/www.wsisp.com\/helps\/73665.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-02-07T19:49:26+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/73665.html","url":"https:\/\/www.wsisp.com\/helps\/73665.html","name":"Linux \u6587\u4ef6\u4e0e\u76ee\u5f55\u7ba1\u740665477 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-02-07T19:49:26+00:00","dateModified":"2026-02-07T19:49:26+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/73665.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/73665.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/73665.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Linux \u6587\u4ef6\u4e0e\u76ee\u5f55\u7ba1\u740665477"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/73665","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=73665"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/73665\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=73665"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=73665"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=73665"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=73665"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}