{"id":84011,"date":"2026-07-26T07:33:10","date_gmt":"2026-07-25T23:33:10","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/84011.html"},"modified":"2026-07-26T07:33:10","modified_gmt":"2026-07-25T23:33:10","slug":"%e3%80%90linux%e3%80%91-%e5%9f%ba%e7%a1%80%e6%8c%87%e4%bb%a4%ef%bc%88%e4%b8%8a%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/84011.html","title":{"rendered":"\u3010Linux\u3011 \u57fa\u7840\u6307\u4ee4\uff08\u4e0a\uff09"},"content":{"rendered":"<p><span style=\"color:#0d0016\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1080\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260725233305-6a6547b1edcf4.png\" width=\"1920\" \/><\/span><\/p>\n<hr \/>\n<h2><span style=\"color:#a2e043\"><span style=\"background-color:#7b7f82\">\u00a0 \u4e00\u3001\u524d\u7f6e\u57fa\u7840\u6982\u5ff5\u00a0\u00a0<\/span><\/span><\/h2>\n<h3><span style=\"color:#1a439c\">1.1 \u547d\u4ee4\u6807\u51c6\u683c\u5f0f<\/span><\/h3>\n<p>\u547d\u4ee4 [\u9009\u9879] [\u64cd\u4f5c\u53c2\u6570]<\/p>\n<ul>\n<li><span style=\"color:#0d0016\">\u547d\u4ee4&#xff1a;\u6838\u5fc3\u64cd\u4f5c\u7a0b\u5e8f&#xff0c;\u5fc5\u586b<\/span><\/li>\n<li><span style=\"color:#0d0016\">\u9009\u9879&#xff1a;-\u77ed\u53c2\u6570\u3001&#8211;\u957f\u53c2\u6570&#xff0c;\u62d3\u5c55\u529f\u80fd<\/span><\/li>\n<li><span style=\"color:#0d0016\">\u53c2\u6570&#xff1a;\u64cd\u4f5c\u5bf9\u8c61&#xff08;\u6587\u4ef6\u3001\u76ee\u5f55\u3001\u8def\u5f84&#xff09; \u793a\u4f8b&#xff1a;ls -l \/home ls &#061; \u547d\u4ee4&#xff0c;-l &#061; \u9009\u9879&#xff0c;\/home &#061; \u64cd\u4f5c\u8def\u5f84<\/span><\/li>\n<\/ul>\n<h3><span style=\"color:#1a439c\">1.2 \u7edd\u5bf9\u8def\u5f84 &amp; \u76f8\u5bf9\u8def\u5f84<\/span><\/h3>\n<li><span style=\"color:#b95514\">\u7edd\u5bf9\u8def\u5f84<\/span><span style=\"color:#0d0016\">&#xff1a;\u4ece\u6839\/\u5f00\u59cb\u5b8c\u6574\u8def\u5f84&#xff0c;\u4efb\u610f\u76ee\u5f55\u751f\u6548 \u4f8b&#xff1a;\/root\u3001\/home\/user<\/span><\/li>\n<li><span style=\"color:#b95514\">\u76f8\u5bf9\u8def\u5f84<\/span><span style=\"color:#0d0016\">&#xff1a;\u57fa\u4e8e\u5f53\u524d\u76ee\u5f55&#xff0c;\u4e0d\u5e26\/ \u4f8b&#xff1a;test\u3001..\/dir<\/span><\/li>\n<h3><span style=\"color:#1a439c\">1.3 \u7279\u6b8a\u8def\u5f84\u7b26\u53f7<\/span><\/h3>\n<ul>\n<li><span style=\"color:#0d0016\">\/\u00a0&#xff1a;\u6839\u76ee\u5f55&#xff0c;Linux \u6587\u4ef6\u9876\u5c42\u5165\u53e3<\/span><\/li>\n<li><span style=\"color:#0d0016\">.\u00a0&#xff1a;\u5f53\u524d\u76ee\u5f55<\/span><\/li>\n<li><span style=\"color:#0d0016\">..\u00a0&#xff1a;\u4e0a\u4e00\u7ea7\u76ee\u5f55<\/span><\/li>\n<li><span style=\"color:#0d0016\">~\u00a0&#xff1a;\u5f53\u524d\u7528\u6237\u5bb6\u76ee\u5f55&#xff08;root&#061;\/root&#xff0c;\u666e\u901a\u7528\u6237 &#061;\/home\/ \u7528\u6237\u540d&#xff09;<\/span><\/li>\n<li><span style=\"color:#0d0016\">$\u00a0&#xff1a;\u666e\u901a\u7528\u6237\u63d0\u793a\u7b26<\/span><\/li>\n<li><span style=\"color:#0d0016\">#\u00a0&#xff1a;root \u7ba1\u7406\u5458\u63d0\u793a\u7b26<\/span><\/li>\n<\/ul>\n<hr \/>\n<h2><span style=\"color:#a2e043\"><span style=\"background-color:#7b7f82\">\u4e8c\u3001\u76ee\u5f55\u64cd\u4f5c\u547d\u4ee4<\/span><\/span><\/h2>\n<h3><span style=\"color:#1a439c\">2.1 pwd \u6253\u5370\u5f53\u524d\u8def\u5f84<\/span><\/h3>\n<p><span style=\"color:#0d0016\">\u4f5c\u7528&#xff1a;\u67e5\u770b\u81ea\u5df1\u6240\u5728\u76ee\u5f55&#xff0c;\u9632\u6b62\u8ff7\u8def \u8bed\u6cd5&#xff1a;pwd \u793a\u4f8b&#xff1a;<\/span><\/p>\n<p>[root&#064;localhost ~]# pwd<br \/>\n\/root<\/p>\n<h3><span style=\"color:#1a439c\">2.2 cd \u5207\u6362\u76ee\u5f55<\/span><\/h3>\n<p><span style=\"color:#0d0016\">\u8bed\u6cd5&#xff1a;cd \u76ee\u6807\u8def\u5f84 \u5e38\u7528\u64cd\u4f5c&#xff1a;<\/span><\/p>\n<p>cd \/home          # \u7edd\u5bf9\u8def\u5f84\u8fdb\u5165home<br \/>\ncd ..             # \u8fd4\u56de\u4e0a\u4e00\u7ea7<br \/>\ncd ..\/..          # \u8fd4\u56de\u4e0a\u4e24\u7ea7<br \/>\ncd ~ \/ cd         # \u56de\u5230\u7528\u6237\u5bb6\u76ee\u5f55<br \/>\ncd test           # \u8fdb\u5165\u5f53\u524d\u76ee\u5f55\u4e0btest\u6587\u4ef6\u5939<br \/>\ncd &#8211;              # \u5207\u6362\u56de\u4e0a\u4e00\u6b21\u6240\u5728\u76ee\u5f55<\/p>\n<p><span style=\"color:#0d0016\">\u6ce8\u610f&#xff1a;\u6587\u4ef6\u5939\u5e26\u7a7a\u683c\u9700\u52a0\u5f15\u53f7 cd &#034;my dir&#034;<\/span><\/p>\n<h3><span style=\"color:#1a439c\">2.3 ls \u5217\u51fa\u76ee\u5f55\u5185\u5bb9<\/span><\/h3>\n<p><span style=\"color:#0d0016\">\u8bed\u6cd5&#xff1a;ls [\u9009\u9879] [\u8def\u5f84] \u6838\u5fc3\u53c2\u6570&#xff1a;<\/span><\/p>\n<ul>\n<li><span style=\"color:#0d0016\">-l&#xff1a;\u8be6\u7ec6\u5217\u8868&#xff08;\u6743\u9650\u3001\u5927\u5c0f\u3001\u65f6\u95f4\u3001\u6240\u6709\u8005&#xff09;<\/span><\/li>\n<li><span style=\"color:#0d0016\">-a&#xff1a;\u663e\u793a\u9690\u85cf\u6587\u4ef6&#xff08;. \u5f00\u5934\u6587\u4ef6&#xff09;<\/span><\/li>\n<li><span style=\"color:#0d0016\">-h&#xff1a;\u4eba\u6027\u5316\u5c55\u793a\u5927\u5c0f KB\/MB\/GB<\/span><\/li>\n<li><span style=\"color:#0d0016\">-t&#xff1a;\u6309\u4fee\u6539\u65f6\u95f4\u6392\u5e8f&#xff0c;\u65b0\u6587\u4ef6\u5728\u524d \u5e38\u7528\u7ec4\u5408&#xff1a;<\/span><\/li>\n<\/ul>\n<p>ls -alh           # \u5b8c\u6574\u67e5\u770b\u5f53\u524d\u6240\u6709\u6587\u4ef6<br \/>\nls -l \/usr\/local  # \u67e5\u770b\u6307\u5b9a\u76ee\u5f55<br \/>\nls -lth           # \u6309\u65f6\u95f4\u5012\u5e8f\u5c55\u793a<\/p>\n<h3><span style=\"color:#1a439c\">2.4 mkdir \u521b\u5efa\u6587\u4ef6\u5939<\/span><\/h3>\n<p><span style=\"color:#0d0016\">\u8bed\u6cd5&#xff1a;mkdir [\u9009\u9879] \u76ee\u5f55\u540d \u6838\u5fc3\u53c2\u6570-p&#xff1a;\u9012\u5f52\u521b\u5efa\u591a\u7ea7\u76ee\u5f55<\/span><\/p>\n<p><span style=\"color:#0d0016\">\u793a\u4f8b&#xff1a;<\/span><\/p>\n<p>mkdir test                  # \u65b0\u5efa\u5355\u76ee\u5f55<br \/>\nmkdir -p a\/b\/c\/d            # \u4e00\u6b21\u6027\u521b\u5efa\u591a\u5c42\u5d4c\u5957<br \/>\nmkdir dir1 dir2 dir3        # \u540c\u65f6\u521b\u5efa\u591a\u4e2a\u76ee\u5f55<\/p>\n<p><span style=\"color:#0d0016\">\u5751&#xff1a;\u4e0d\u52a0-p&#xff0c;\u4e0a\u7ea7\u4e0d\u5b58\u5728\u5219\u62a5\u9519<\/span><\/p>\n<h3><span style=\"color:#1a439c\">2.5 rmdir \u5220\u9664\u7a7a\u76ee\u5f55<\/span><\/h3>\n<p><span style=\"color:#0d0016\">\u4ec5\u80fd\u5220\u9664<\/span><span style=\"color:#be191c\">\u65e0\u6587\u4ef6\u7684\u7a7a<\/span><span style=\"color:#0d0016\">\u6587\u4ef6\u5939<\/span><\/p>\n<p>rmdir test<\/p>\n<p><span style=\"color:#0d0016\">\u65e5\u5e38\u5220\u9664\u76ee\u5f55\u57fa\u672c\u7528 rm&#xff0c;rmdir \u6781\u5c11\u4f7f\u7528<\/span><\/p>\n<hr \/>\n<h2><span style=\"color:#a2e043\"><span style=\"background-color:#7b7f82\">\u00a0 \u4e09\u3001\u6587\u4ef6\u64cd\u4f5c\u547d\u4ee4\u00a0\u00a0<\/span><\/span><\/h2>\n<h3><span style=\"color:#1a439c\">3.1 touch \u521b\u5efa\u7a7a\u6587\u4ef6 \/ \u66f4\u65b0\u6587\u4ef6\u65f6\u95f4<\/span><\/h3>\n<p>touch app.log               # \u521b\u5efa\u5355\u4e2a\u7a7a\u767d\u6587\u4ef6<br \/>\ntouch 1.txt 2.txt 3.csv    # \u6279\u91cf\u521b\u5efa\u6587\u4ef6<\/p>\n<h3><span style=\"color:#1a439c\">3.2 rm \u5220\u9664\u6587\u4ef6 \/ \u6587\u4ef6\u5939&#xff08;\u9ad8\u5371&#xff09;<\/span><\/h3>\n<p><span style=\"color:#0d0016\">Linux \u65e0\u56de\u6536\u7ad9&#xff0c;\u5220\u9664\u6c38\u4e45\u4e22\u5931 \u8bed\u6cd5&#xff1a;rm [\u9009\u9879] \u6587\u4ef6\/\u76ee\u5f55 \u53c2\u6570&#xff1a;<\/span><\/p>\n<ul>\n<li><span style=\"color:#0d0016\">-f&#xff1a;<\/span><span style=\"color:#fe2c24\">\u5f3a\u5236\u5220\u9664<\/span><span style=\"color:#0d0016\">&#xff0c;\u4e0d\u5f39\u7a97\u786e\u8ba4<\/span><\/li>\n<li><span style=\"color:#0d0016\">-r&#xff1a;<\/span><span style=\"color:#fe2c24\">\u9012\u5f52\u5220\u9664<\/span><span style=\"color:#0d0016\">\u6587\u4ef6\u5939\u5185\u6240\u6709\u5185\u5bb9<\/span><\/li>\n<\/ul>\n<p>rm test.txt                 # \u5220\u9664\u6587\u4ef6&#xff0c;\u4f1a\u786e\u8ba4<br \/>\nrm -f test.txt              # \u5f3a\u5236\u5220\u6587\u4ef6<br \/>\nrm -rf test\/                # \u9012\u5f52\u5f3a\u5236\u5220\u9664\u6587\u4ef6\u5939<\/p>\n<p><span style=\"color:#0d0016\">\u26a0\ufe0f \u4e25\u7981\u6267\u884c rm -rf \/&#xff0c;\u4f1a\u6e05\u7a7a\u6574\u4e2a\u7cfb\u7edf&#xff0c;\u670d\u52a1\u5668\u76f4\u63a5\u62a5\u5e9f<\/span><\/p>\n<h3><span style=\"color:#1a439c\">3.3 cp \u590d\u5236\u6587\u4ef6 \/ \u76ee\u5f55<\/span><\/h3>\n<p><span style=\"color:#0d0016\">\u8bed\u6cd5&#xff1a;cp \u6e90 \u76ee\u6807 \u53c2\u6570-r&#xff1a;\u590d\u5236\u6587\u4ef6\u5939\u5fc5\u987b\u52a0<\/span><\/p>\n<p>cp test.txt \/home\/          # \u590d\u5236\u6587\u4ef6\u5230\u6307\u5b9a\u76ee\u5f55<br \/>\ncp -r test\/ \/root\/          # \u590d\u5236\u6574\u4e2a\u6587\u4ef6\u5939<br \/>\ncp old.txt new.txt          # \u590d\u5236\u5e76\u91cd\u547d\u540d<\/p>\n<h3><span style=\"color:#1a439c\">3.4 mv \u79fb\u52a8 \/ \u91cd\u547d\u540d<\/span><\/h3>\n<p><span style=\"color:#0d0016\">\u65e0\u9700\u9012\u5f52\u53c2\u6570&#xff0c;\u652f\u6301\u6587\u4ef6\u5939\u64cd\u4f5c<\/span><\/p>\n<p>mv test.txt \/usr\/           # \u79fb\u52a8\u6587\u4ef6<br \/>\nmv oldname.txt newname.txt  # \u6587\u4ef6\u91cd\u547d\u540d<br \/>\nmv dir1 \/home\/              # \u79fb\u52a8\u6587\u4ef6\u5939<\/p>\n<hr \/>\n<h2><span style=\"color:#a2e043\"><span style=\"background-color:#7b7f82\">\u00a0 \u56db\u3001\u6587\u4ef6\u5185\u5bb9\u67e5\u770b&#xff08;\u65e5\u5fd7 \/ \u914d\u7f6e\u4e13\u7528&#xff09;<\/span><\/span><\/h2>\n<h3><span style=\"color:#1a439c\">4.1 cat \u4e00\u6b21\u6027\u8bfb\u53d6\u5168\u90e8\u5185\u5bb9<\/span><\/h3>\n<p><span style=\"color:#0d0016\">\u9002\u5408\u5c0f\u6587\u4ef6&#xff0c;\u5927\u6587\u4ef6\u4f1a\u5237\u5c4f<\/span><\/p>\n<p>cat \/etc\/profile<\/p>\n<h3><span style=\"color:#1a439c\">4.2 more \u5206\u9875\u67e5\u770b&#xff0c;\u4ec5\u5411\u4e0b\u7ffb<\/span><\/h3>\n<p>more app.log<\/p>\n<p><span style=\"color:#0d0016\">\u64cd\u4f5c&#xff1a;\u7a7a\u683c\u4e0b\u4e00\u9875\u3001\u56de\u8f66\u4e0b\u4e00\u884c\u3001q \u9000\u51fa<\/span><\/p>\n<h3><span style=\"color:#1a439c\">4.3 less \u9ad8\u7ea7\u5206\u9875&#xff08;\u63a8\u8350&#xff09;<\/span><\/h3>\n<p><span style=\"color:#0d0016\">\u652f\u6301\u4e0a\u4e0b\u7ffb\u9875\u3001\u5173\u952e\u8bcd\u641c\u7d22<\/span><\/p>\n<p>less app.log<\/p>\n<p><span style=\"color:#0d0016\">\u5feb\u6377\u952e&#xff1a;\u4e0a\u4e0b\u7bad\u5934\u7ffb\u884c\u3001PgUp\/PgDn \u7ffb\u9875\u3001\/\u5173\u952e\u8bcd\u5411\u4e0b\u641c\u7d22&#xff0c;n \u5207\u6362\u5339\u914d\u9879&#xff0c;q \u9000\u51fa<\/span><\/p>\n<h3><span style=\"color:#1a439c\">4.4 head \u67e5\u770b\u6587\u4ef6\u5934\u90e8&#xff0c;\u9ed8\u8ba4\u524d 10 \u884c<\/span><\/h3>\n<p>head -n 20 app.log  # \u67e5\u770b\u524d20\u884c<\/p>\n<h3><span style=\"color:#1a439c\">4.5 tail \u67e5\u770b\u6587\u4ef6\u5c3e\u90e8&#xff0c;\u65e5\u5fd7\u76d1\u63a7\u795e\u5668<\/span><\/h3>\n<p><span style=\"color:#0d0016\">\u53c2\u6570&#xff1a;<\/span><\/p>\n<ul>\n<li><span style=\"color:#0d0016\">-n&#xff1a;\u6307\u5b9a\u672b\u5c3e\u884c\u6570<\/span><\/li>\n<li><span style=\"color:#0d0016\">-f&#xff1a;\u5b9e\u65f6\u8ddf\u8e2a\u6587\u4ef6\u65b0\u589e\u5185\u5bb9<\/span><\/li>\n<\/ul>\n<p>tail -n 100 app.log  # \u67e5\u770b\u6700\u540e100\u884c\u65e5\u5fd7<br \/>\ntail -f app.log      # \u5b9e\u65f6\u5237\u65b0\u65e5\u5fd7&#xff0c;\u6392\u67e5\u62a5\u9519\u5fc5\u5907<\/p>\n<hr \/>\n<h2><span style=\"color:#a2e043\"><span style=\"background-color:#7b7f82\">\u00a0 \u4e94\u3001\u6587\u4ef6\u68c0\u7d22\u547d\u4ee4\u00a0\u00a0<\/span><\/span><\/h2>\n<h3><span style=\"color:#1a439c\">5.1 find \u5168\u76d8\u67e5\u627e\u6587\u4ef6<\/span><\/h3>\n<p><span style=\"color:#0d0016\">\u8bed\u6cd5&#xff1a;find \u67e5\u627e\u8def\u5f84 -name &#034;\u5339\u914d\u89c4\u5219&#034; \u901a\u914d\u7b26*\u5339\u914d\u4efb\u610f\u5b57\u7b26<\/span><\/p>\n<p>find \/ -name &#034;*.txt&#034;          # \u5168\u5c40\u67e5\u627e\u6240\u6709txt\u6587\u4ef6<br \/>\nfind \/home -name &#034;*log*&#034;      # home\u76ee\u5f55\u67e5\u627e\u540d\u79f0\u542blog\u7684\u6587\u4ef6<\/p>\n<h3><span style=\"color:#1a439c\">5.2 grep \u6587\u4ef6\u5185\u8fc7\u6ee4\u5173\u952e\u8bcd<\/span><\/h3>\n<p><span style=\"color:#0d0016\">\u8bed\u6cd5&#xff1a;grep [\u9009\u9879] &#034;\u5173\u952e\u8bcd&#034; \u6587\u4ef6 \u53c2\u6570&#xff1a;<\/span><\/p>\n<ul>\n<li><span style=\"color:#0d0016\">-n&#xff1a;\u663e\u793a\u5339\u914d\u884c\u53f7<\/span><\/li>\n<li><span style=\"color:#0d0016\">-i&#xff1a;\u5ffd\u7565\u5927\u5c0f\u5199<\/span><\/li>\n<li><span style=\"color:#0d0016\">-v&#xff1a;\u53cd\u5411\u8fc7\u6ee4&#xff08;\u6392\u9664\u542b\u5173\u952e\u8bcd\u5185\u5bb9&#xff09;<\/span><\/li>\n<\/ul>\n<p>grep -n &#034;error&#034; app.log       # \u67e5\u627e\u65e5\u5fd7\u62a5\u9519&#xff0c;\u5e26\u884c\u53f7<br \/>\ngrep -v &#034;^$&#034; app.log          # \u8fc7\u6ee4\u65e5\u5fd7\u7a7a\u884c<br \/>\nps -ef | grep java            # \u7ba1\u9053\u642d\u914d&#xff0c;\u67e5\u627ejava\u8fdb\u7a0b<\/p>\n<hr \/>\n<h2><span style=\"color:#a2e043\"><span style=\"background-color:#7b7f82\">\u00a0 \u516d\u3001\u6587\u4ef6\u6743\u9650\u7ba1\u7406\u00a0\u00a0<\/span><\/span><\/h2>\n<p><span style=\"color:#0d0016\">Linux \u6587\u4ef6\u5206\u4e3a\u4e09\u7c7b\u6743\u9650&#xff1a;\u6240\u6709\u8005\u3001\u6240\u5c5e\u7ec4\u3001\u5176\u4ed6\u7528\u6237 <\/span><\/p>\n<p><span style=\"color:#0d0016\">\u6743\u9650\u6570\u503c&#xff1a;r&#061;4 \u8bfb&#xff0c;w&#061;2 \u5199&#xff0c;x&#061;1 \u6267\u884c<\/span><\/p>\n<h3><span style=\"color:#1a439c\">6.1 chmod \u4fee\u6539\u6743\u9650<\/span><\/h3>\n<p><span style=\"color:#0d0016\">\u5e38\u7528\u6743\u9650\u6807\u51c6&#xff1a;<\/span><\/p>\n<ul>\n<li><span style=\"color:#0d0016\">755&#xff1a;\u6240\u6709\u8005\u5168\u90e8\u6743\u9650&#xff0c;\u5176\u4ed6\u53ef\u8bfb\u6267\u884c&#xff08;\u76ee\u5f55\u9ed8\u8ba4&#xff09;<\/span><\/li>\n<li><span style=\"color:#0d0016\">644&#xff1a;\u6240\u6709\u8005\u8bfb\u5199&#xff0c;\u5176\u4ed6\u53ea\u8bfb&#xff08;\u666e\u901a\u6587\u4ef6\u9ed8\u8ba4&#xff09;<\/span><\/li>\n<li><span style=\"color:#0d0016\">777&#xff1a;\u5168\u90e8\u7528\u6237\u6700\u9ad8\u6743\u9650&#xff08;\u751f\u4ea7\u7981\u6b62\u4f7f\u7528&#xff09;<\/span><\/li>\n<\/ul>\n<p>chmod 644 test.txt<br \/>\nchmod -R 755 project\/  # -R\u9012\u5f52\u4fee\u6539\u76ee\u5f55\u5185\u6240\u6709\u6587\u4ef6<\/p>\n<h3><span style=\"color:#1a439c\">6.2 chown \u4fee\u6539\u6587\u4ef6\u5f52\u5c5e\u7528\u6237 \/ \u7ec4<\/span><\/h3>\n<p>chown root:root test.txt<br \/>\nchown -R root:root project\/<\/p>\n<hr \/>\n<h2><span style=\"color:#a2e043\"><span style=\"background-color:#7b7f82\">\u00a0 \u4e03\u3001\u7cfb\u7edf\u8fdb\u7a0b\u4e0e\u8d44\u6e90\u67e5\u770b\u00a0\u00a0<\/span><\/span><\/h2>\n<h3><span style=\"color:#1a439c\">7.1 ps \u67e5\u770b\u8fdb\u7a0b<\/span><\/h3>\n<p>ps -ef                 # \u5217\u51fa\u7cfb\u7edf\u5168\u90e8\u8fdb\u7a0b<br \/>\nps -ef | grep mysql    # \u8fc7\u6ee4mysql\u8fdb\u7a0b<\/p>\n<h3><span style=\"color:#1a439c\">7.2 top \u5b9e\u65f6\u8d44\u6e90\u76d1\u63a7<\/span><\/h3>\n<p><span style=\"color:#0d0016\">\u7b49\u540c\u4e8e Windows \u4efb\u52a1\u7ba1\u7406\u5668&#xff0c;\u67e5\u770b CPU\u3001\u5185\u5b58\u5360\u7528 \u8f93\u5165top\u56de\u8f66&#xff0c;q \u9000\u51fa<\/span><\/p>\n<h3><span style=\"color:#1a439c\">7.3 kill \u7ec8\u6b62\u8fdb\u7a0b<\/span><\/h3>\n<p>kill 1234        # \u6b63\u5e38\u5173\u95edPID&#061;1234\u8fdb\u7a0b<br \/>\nkill -9 1234     # \u5f3a\u5236\u6740\u6b7b\u5361\u6b7b\u8fdb\u7a0b<\/p>\n<h3><span style=\"color:#1a439c\">7.4 \u78c1\u76d8\u7a7a\u95f4\u547d\u4ee4<\/span><\/h3>\n<p>df -h    # \u67e5\u770b\u670d\u52a1\u5668\u6574\u4f53\u78c1\u76d8\u6302\u8f7d\u3001\u603b\u5360\u7528<br \/>\ndu -sh * # \u67e5\u770b\u5f53\u524d\u76ee\u5f55\u5404\u6587\u4ef6\u5939\u5927\u5c0f<\/p>\n<hr \/>\n<h2><span style=\"color:#a2e043\"><span style=\"background-color:#7b7f82\">\u00a0 \u516b\u3001\u7f51\u7edc\u547d\u4ee4\u00a0\u00a0<\/span><\/span><\/h2>\n<h3><span style=\"color:#1a439c\">8.1 ping \u6d4b\u8bd5\u8fde\u901a\u6027<\/span><\/h3>\n<p>ping www.baidu.com<\/p>\n<h3><span style=\"color:#1a439c\">8.2 ip addr \u67e5\u770b\u672c\u673a IP<\/span><\/h3>\n<p><span style=\"color:#0d0016\">\u66ff\u4ee3\u8001\u65e7 ifconfig \u547d\u4ee4<\/span><\/p>\n<p>ip addr<\/p>\n<h3><span style=\"color:#1a439c\">8.3 curl \u547d\u4ee4\u884c\u8bbf\u95ee\u7f51\u5740 \/ \u63a5\u53e3<\/span><\/h3>\n<p>curl https:\/\/www.baidu.com<\/p>\n<hr \/>\n<h2><span style=\"color:#a2e043\"><span style=\"background-color:#7b7f82\">\u00a0 \u4e5d\u3001\u538b\u7f29\u89e3\u538b\u547d\u4ee4\u00a0\u00a0<\/span><\/span><\/h2>\n<h3><span style=\"color:#1a439c\">9.1 zip\/unzip<\/span><\/h3>\n<p>zip test.zip test.txt    # \u538b\u7f29<br \/>\nunzip test.zip           # \u89e3\u538b<\/p>\n<h3><span style=\"color:#1a439c\">9.2 tar&#xff08;Linux \u4e3b\u6d41\u6253\u5305\u683c\u5f0f&#xff09;<\/span><\/h3>\n<p><span style=\"color:#0d0016\">\u53c2\u6570\u542b\u4e49&#xff1a;c \u6253\u5305\u3001x \u89e3\u538b\u3001z gz \u538b\u7f29\u3001v \u6253\u5370\u8fc7\u7a0b\u3001f \u6307\u5b9a\u538b\u7f29\u5305<\/span><\/p>\n<p># \u538b\u7f29\u6587\u4ef6\u5939\u4e3atar.gz<br \/>\ntar -zcvf test.tar.gz test\/<br \/>\n# \u89e3\u538btar.gz\u5305<br \/>\ntar -zxvf test.tar.gz<\/p>\n<hr \/>\n<h2><span style=\"color:#a2e043\"><span style=\"background-color:#7b7f82\">\u00a0 \u5341\u3001\u9ad8\u9891\u5b9e\u7528\u5c0f\u547d\u4ee4\u00a0\u00a0<\/span><\/span><\/h2>\n<p>clear          # \u6e05\u7a7a\u7ec8\u7aef\u5c4f\u5e55<br \/>\nhistory        # \u67e5\u770b\u6240\u6709\u6267\u884c\u8fc7\u7684\u5386\u53f2\u547d\u4ee4<br \/>\nwhoami         # \u67e5\u770b\u5f53\u524d\u767b\u5f55\u7528\u6237<br \/>\nhostname       # \u67e5\u770b\u670d\u52a1\u5668\u4e3b\u673a\u540d<\/p>\n<hr \/>\n<h2><span style=\"color:#a2e043\"><span style=\"background-color:#7b7f82\">\u00a0 \u5341\u4e00\u3001\u5b66\u4e60\u603b\u7ed3\u00a0\u00a0<\/span><\/span><\/h2>\n<li><span style=\"color:#0d0016\">\u76ee\u5f55\u57fa\u7840&#xff1a;pwd\u3001cd\u3001ls\u3001mkdir \u5fc5\u987b\u719f\u7ec3<\/span><\/li>\n<li><span style=\"color:#0d0016\">\u6587\u4ef6\u64cd\u4f5c&#xff1a;rm -rf \u9ad8\u5371\u614e\u7528&#xff0c;cp\/mv\/touch \u65e5\u5e38\u9ad8\u9891<\/span><\/li>\n<li><span style=\"color:#0d0016\">\u65e5\u5fd7\u6392\u67e5&#xff1a;tail -f\u3001grep\u3001less \u5f00\u53d1\u6838\u5fc3\u7ec4\u5408<\/span><\/li>\n<li><span style=\"color:#0d0016\">\u6743\u9650&#xff1a;755\u3001644 \u4e3a\u7ebf\u4e0a\u6807\u51c6\u6743\u9650<\/span><\/li>\n<li><span style=\"color:#0d0016\">\u670d\u52a1\u5668\u8fd0\u7ef4&#xff1a;top\u3001ps\u3001kill\u3001df\u3001du \u5b9a\u4f4d\u8d44\u6e90\u5f02\u5e38<\/span><\/li>\n<hr \/>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1292\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260725233307-6a6547b381c78.png\" width=\"2558\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u524d\u7f6e\u57fa\u7840\u6982\u5ff5\u00a0\u00a01.1 \u547d\u4ee4\u6807\u51c6\u683c\u5f0f\u547d\u4ee4 [\u9009\u9879] [\u64cd\u4f5c\u53c2\u6570]\u547d\u4ee4&#xff1a;\u6838\u5fc3\u64cd\u4f5c\u7a0b\u5e8f&#xff0c;\u5fc5\u586b\u9009\u9879&#xff1a;-\u77ed\u53c2\u6570\u3001&#8211;\u957f\u53c2\u6570&#xff0c;\u62d3\u5c55\u529f\u80fd\u53c2\u6570&#xff1a;\u64cd\u4f5c\u5bf9\u8c61&#xff08;\u6587\u4ef6\u3001\u76ee\u5f55\u3001\u8def\u5f84&#xff09; \u793a\u4f8b&#xff1a;ls -l \/home ls  \u547d\u4ee4&#xff0c;-l  \u9009\u9879&#xff0c;\/home  \u64cd\u4f5c\u8def\u5f841.2 \u7edd\u5bf9\u8def\u5f84 &amp; \u76f8\u5bf9\u8def\u5f84\u7edd\u5bf9\u8def\u5f84&#xff1a;\u4ece\u6839\/\u5f00\u59cb\u5b8c\u6574\u8def\u5f84&#xff0c;\u4efb\u610f\u76ee\u5f55<\/p>\n","protected":false},"author":2,"featured_media":84009,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[9099,58,43,44],"topic":[],"class_list":["post-84011","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-9099","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>\u3010Linux\u3011 \u57fa\u7840\u6307\u4ee4\uff08\u4e0a\uff09 - \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\/84011.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010Linux\u3011 \u57fa\u7840\u6307\u4ee4\uff08\u4e0a\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4e00\u3001\u524d\u7f6e\u57fa\u7840\u6982\u5ff5\u00a0\u00a01.1 \u547d\u4ee4\u6807\u51c6\u683c\u5f0f\u547d\u4ee4 [\u9009\u9879] [\u64cd\u4f5c\u53c2\u6570]\u547d\u4ee4&#xff1a;\u6838\u5fc3\u64cd\u4f5c\u7a0b\u5e8f&#xff0c;\u5fc5\u586b\u9009\u9879&#xff1a;-\u77ed\u53c2\u6570\u3001--\u957f\u53c2\u6570&#xff0c;\u62d3\u5c55\u529f\u80fd\u53c2\u6570&#xff1a;\u64cd\u4f5c\u5bf9\u8c61&#xff08;\u6587\u4ef6\u3001\u76ee\u5f55\u3001\u8def\u5f84&#xff09; \u793a\u4f8b&#xff1a;ls -l \/home ls \u547d\u4ee4&#xff0c;-l \u9009\u9879&#xff0c;\/home \u64cd\u4f5c\u8def\u5f841.2 \u7edd\u5bf9\u8def\u5f84 &amp; \u76f8\u5bf9\u8def\u5f84\u7edd\u5bf9\u8def\u5f84&#xff1a;\u4ece\u6839\/\u5f00\u59cb\u5b8c\u6574\u8def\u5f84&#xff0c;\u4efb\u610f\u76ee\u5f55\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/84011.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-25T23:33:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260725233305-6a6547b1edcf4.png\" \/>\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=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/84011.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/84011.html\",\"name\":\"\u3010Linux\u3011 \u57fa\u7840\u6307\u4ee4\uff08\u4e0a\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-25T23:33:10+00:00\",\"dateModified\":\"2026-07-25T23:33:10+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/84011.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/84011.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/84011.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010Linux\u3011 \u57fa\u7840\u6307\u4ee4\uff08\u4e0a\uff09\"}]},{\"@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":"\u3010Linux\u3011 \u57fa\u7840\u6307\u4ee4\uff08\u4e0a\uff09 - \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\/84011.html","og_locale":"zh_CN","og_type":"article","og_title":"\u3010Linux\u3011 \u57fa\u7840\u6307\u4ee4\uff08\u4e0a\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4e00\u3001\u524d\u7f6e\u57fa\u7840\u6982\u5ff5\u00a0\u00a01.1 \u547d\u4ee4\u6807\u51c6\u683c\u5f0f\u547d\u4ee4 [\u9009\u9879] [\u64cd\u4f5c\u53c2\u6570]\u547d\u4ee4&#xff1a;\u6838\u5fc3\u64cd\u4f5c\u7a0b\u5e8f&#xff0c;\u5fc5\u586b\u9009\u9879&#xff1a;-\u77ed\u53c2\u6570\u3001--\u957f\u53c2\u6570&#xff0c;\u62d3\u5c55\u529f\u80fd\u53c2\u6570&#xff1a;\u64cd\u4f5c\u5bf9\u8c61&#xff08;\u6587\u4ef6\u3001\u76ee\u5f55\u3001\u8def\u5f84&#xff09; \u793a\u4f8b&#xff1a;ls -l \/home ls \u547d\u4ee4&#xff0c;-l \u9009\u9879&#xff0c;\/home \u64cd\u4f5c\u8def\u5f841.2 \u7edd\u5bf9\u8def\u5f84 &amp; \u76f8\u5bf9\u8def\u5f84\u7edd\u5bf9\u8def\u5f84&#xff1a;\u4ece\u6839\/\u5f00\u59cb\u5b8c\u6574\u8def\u5f84&#xff0c;\u4efb\u610f\u76ee\u5f55","og_url":"https:\/\/www.wsisp.com\/helps\/84011.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-25T23:33:10+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260725233305-6a6547b1edcf4.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/84011.html","url":"https:\/\/www.wsisp.com\/helps\/84011.html","name":"\u3010Linux\u3011 \u57fa\u7840\u6307\u4ee4\uff08\u4e0a\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-25T23:33:10+00:00","dateModified":"2026-07-25T23:33:10+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/84011.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/84011.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/84011.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u3010Linux\u3011 \u57fa\u7840\u6307\u4ee4\uff08\u4e0a\uff09"}]},{"@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\/84011","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=84011"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/84011\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/84009"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=84011"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=84011"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=84011"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=84011"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}