{"id":1236,"date":"2019-06-25T23:01:24","date_gmt":"2019-06-25T15:01:24","guid":{"rendered":"https:\/\/blog.jsjs.org\/?p=1236"},"modified":"2019-06-25T23:01:24","modified_gmt":"2019-06-25T15:01:24","slug":"%e5%81%9a%e4%b8%ba%e4%b8%80%e5%90%8d%e4%bc%98%e7%a7%80%e7%9a%84%e5%90%8e%e7%ab%af%e5%b7%a5%e7%a8%8b%e5%b8%88-%e5%85%bc%e5%85%ac%e5%8f%b8%e7%bd%91%e7%ae%a1%ef%bc%8c%e8%bf%99%e4%ba%9b-linux-%e6%8c%87","status":"publish","type":"post","link":"https:\/\/blog.jsjs.org\/?p=1236","title":{"rendered":"\u505a\u4e3a\u4e00\u540d\u4f18\u79c0\u7684\u540e\u7aef\u5de5\u7a0b\u5e08-\u517c\u516c\u53f8\u7f51\u7ba1\uff0c\u8fd9\u4e9b Linux \u6307\u4ee4\u9700\u8981\u4e86\u89e3\u4e0b"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u524d\u8a00<\/h2>\n\n\n\n<p>\u672c\u6587\u6536\u5f55\u4e86 linux \u5e38\u7528\u6307\u4ee4\uff0c\u8fd9\u91cc\u9762\u6709\u4e2a\u5c0f\u6280\u5de7\uff0c\u57fa\u672c\u4e0a\u6240\u6709\u6307\u4ee4\u540e\u9762\u8ddf\u4e0a &#8211;h \u53ef\u4ee5\u663e\u793a\u5176\u4f7f\u7528\u65b9\u6cd5\u3002\u6545\u4e0d\u5fc5\u6b7b\u8bb0\u786c\u80cc\uff0c\u77e5\u5176\u610f\u4e43\u901a\u5176\u5f62\u3002<\/p>\n\n\n\n<p>\u5206\u7c7b\u5982\u4e0b\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u6587\u4ef6 &amp; \u76ee\u5f55\u64cd\u4f5c\uff0816 \u4e2a\uff09<\/li><li>\u67e5\u770b\u6587\u4ef6 &amp; \u5185\u5bb9\u5904\u7406\uff0818 \u4e2a\uff09<\/li><li>\u6587\u4ef6\u538b\u7f29 &amp; \u89e3\u538b\u7f29\uff083 \u4e2a\uff09<\/li><li>\u4fe1\u606f\u663e\u793a\uff0811 \u4e2a\uff09<\/li><li>\u641c\u7d22\u6587\u4ef6\uff084 \u4e2a\uff09<\/li><li>\u8fdb\u7a0b\u7ba1\u7406\uff0811 \u4e2a\uff09<\/li><li>\u7528\u6237\u7ba1\u7406\uff087 \u4e2a\uff09<\/li><li>\u7f51\u7edc\u64cd\u4f5c\uff0811 \u4e2a\uff09<\/li><li>\u78c1\u76d8 &amp; \u6587\u4ef6\u7cfb\u7edf\uff087 \u4e2a\uff09<\/li><li>\u7cfb\u7edf\u6743\u9650\uff083 \u4e2a\uff09<\/li><li>\u5173\u673a\u91cd\u542f\uff085 \u4e2a\uff09<\/li><li>\u5176\u4ed6\uff086 \u4e2a\uff09<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u6587\u4ef6 &amp; \u76ee\u5f55\u64cd\u4f5c\uff0816 \u4e2a\uff09<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">ls<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>ls -a \u67e5\u770b\u6240\u6709\u6587\u4ef6\uff0c\u5305\u542b\u9690\u85cf\u6587\u4ef6<\/li><li>ls -l \u7b80\u5199 ll\uff0c\u67e5\u770b\u8be6\u7ec6\u4fe1\u606f<\/li><li>ls -h \u6587\u4ef6\u5927\u5c0f\u4ee5\u6613\u8bfb\u7684\u65b9\u5f0f\u663e\u793a<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">cd<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>cd ..\/ \u8fd4\u56de\u4e0a\u7ea7\u76ee\u5f55<\/li><li>cd ~ \u524d\u5f80\u5bb6\u76ee\u5f55<\/li><li>cd &#8211; \u8fd4\u56de\u4e0a\u4e00\u6b21\u6240\u5728\u76ee\u5f55<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">cp<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>cp -r \u590d\u5236\u76ee\u5f55\u53ca\u76ee\u5f55\u4e0b\u6587\u4ef6<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">find<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>find \/ -name &#8216;target&#8217; \u67e5\u8be2\u6839\u76ee\u5f55\u4e0b\u9762\u6587\u4ef6\u540d\u4e3a target \u7684\u6587\u4ef6<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">mkdir<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>mkdir -p \/tmp\/test \u9012\u5f52\u521b\u5efa\u76ee\u5f55<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">mv<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>mv -f source destination \u5f3a\u5236<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">pwd<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>pwd \u663e\u793a\u5f53\u524d\u8def\u5f84<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">rm<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>rm -rf \/ \u5f3a\u5236\u5220\u9664\u6839\u76ee\u5f55\u53ca\u76ee\u5f55\u4e0b\u7684\u6587\u4ef6\uff0c\u5c31\u662f\u6211\u4eec\u901a\u5e38\u6240\u8bf4\u7684\u5220\u5e93\u8dd1\u8def<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">touch<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>touch target \u521b\u5efa target \u6587\u4ef6\uff0c\u82e5\u6587\u4ef6\u5b58\u5728\u5219\u6539\u53d8\u6587\u4ef6\u65f6\u95f4\u6233<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">tree<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>tree \u529f\u80fd\u662f\u4ee5\u6811\u5f62\u7ed3\u6784\u663e\u793a\u76ee\u5f55\u4e0b\u7684\u5185\u5bb9<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">basename<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>basename \/tmp\/1 \u663e\u793a\u6587\u4ef6\u540d<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">dirname<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>dirname \/tmp\/1 \u663e\u793a\u8def\u5f84<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">chattr<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>chattr +i \/tmp\/1 \u52a0 i \u5c5e\u6027\uff0c\u9632\u6b62\u6587\u4ef6\u88ab\u4fee\u6539<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">lsattr<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>lsattr \/tmp\/1 \u67e5\u770b\u6587\u4ef6\u7684\u6269\u5c55\u5c5e\u6027<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">file<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>file \/tmp\/1 \u663e\u793a\u6587\u4ef6\u7c7b\u578b<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">md5<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>md5 \/tmp\/1 \u663e\u793a\u6587\u4ef6 MD5 \u503c<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u67e5\u770b\u6587\u4ef6 &amp; \u5185\u5bb9\u5904\u7406\uff0818 \u4e2a\uff09<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">cat<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>cat -n \u663e\u793a\u884c\u53f7<\/li><li>cat file1 file2 \u6253\u5f00\u6587\u4ef6 1 \u548c 2<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">more<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>more file1 \u9010\u9875\u663e\u793a<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">less<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>less file1 \u4e5f\u662f\u9010\u9875\u663e\u793a\uff0c\u4e0e more \u65b9\u5411\u76f8\u53cd<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">head<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>head -n file \u663e\u793a\u6587\u4ef6\u5934 n \u884c<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">tail<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>tail -n file \u663e\u793a\u6587\u4ef6\u5c3e n \u884c<\/li><li>tailf file \u5b9e\u65f6\u663e\u793a\u6587\u4ef6\u5c3e 10 \u884c\uff0c\u5e38\u7528\u4e8e\u8ddf\u8e2a\u65e5\u5fd7\u4fe1\u606f<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">cut<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>who|cut -b 1-3,5 \u8f93\u51fa\u6bcf\u884c\u7684 1 \u81f3 3 \u4e2a\u5b57\u8282\u548c\u7b2c 5 \u4e2a\u5b57\u8282<\/li><li>who|cut -c -3 \u8f93\u51fa\u6bcf\u884c\u7684 1 \u81f3 3 \u4e2a\u5b57\u7b26<\/li><li>who|cut -c 3- \u8f93\u51fa\u6bcf\u884c\u7684\u7b2c 3 \u4e2a\u5b57\u7b26\u5230\u884c\u5c3e<\/li><li>who|cut -d &#8216; &#8216; -f 1 \u4ee5\u7a7a\u683c\u4e3a\u5206\u9694\u7b26\uff0c\u8f93\u51fa\u7b2c\u4e00\u4e2a\u57df<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">split<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>split -b 10k date.file \u5c06\u6587\u4ef6\u5206\u5272\u4e3a 10k \u7684\u591a\u4e2a\u5b50\u6587\u4ef6<\/li><li>split -b 10k date.file split_file \u6307\u5b9a\u5b50\u6587\u4ef6\u524d\u7f00\u4e3a split_file<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">paste<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>psate file1 file2 file3 \u5c06 3 \u4e2a\u6587\u4ef6\u6309\u5217\u5408\u5e76<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">sort<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>sort -n \u6309\u7167\u6570\u503c\u5927\u5c0f\u6392\u5e8f<\/li><li>sort -r \u5012\u5e8f\u6392\u5e8f<\/li><li>sort -t \u6307\u5b9a\u5206\u9694\u7b26<\/li><li>sort -u \u5ffd\u7565\u76f8\u540c\u884c<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">uniq<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>uniq -c \u663e\u793a\u51fa\u73b0\u6b21\u6570\uff0c\u53ea\u6709\u76f8\u90bb\u7684\u624d\u7b97\u91cd\u590d<\/li><li>uniq -d \u53ea\u663e\u793a\u91cd\u590d\u7684\u884c<\/li><li>unqi -u \u53ea\u663e\u793a\u4e0d\u91cd\u590d\u7684\u884c<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">wc<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>wc -l \u663e\u793a\u5217\u6570<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">diff<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>diff file1 file2 \u6bd4\u8f83\u4e24\u4e2a\u6587\u4ef6\u5dee\u5f02<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">rev<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>rev file \u53cd\u5411\u8f93\u51fa\u6587\u4ef6\u5185\u5bb9<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">grep<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>grep &#8216;target&#8217; file \u8fc7\u6ee4\u8f93\u51fa\u6587\u4ef6\u4e2d\u5305\u542b target \u7684\u884c<\/li><li>grep -v &#8216;target&#8217; file \u8fc7\u6ee4\u8f93\u51fa\u6587\u4ef6\u4e2d\u4e0d\u5305\u542b target \u7684\u884c<\/li><li>grep -c &#8216;target&#8217; file \u8fc7\u6ee4\u8f93\u51fa\u6587\u4ef6\u4e2d\u5305\u542b target \u7684\u884c\u6570<\/li><li>grep -i &#8216;target&#8217; file \u5ffd\u7565\u5927\u5c0f\u5199<\/li><li>egrep &#8216;[1-9]|a&#8217; file \u8fc7\u6ee4\u8f93\u51fa\u6b63\u5219\u5339\u914d\u5230\u7684\u884c<\/li><li>seq 10 | grep &#8220;5&#8221; -A 3 \u663e\u793a\u5339\u914d\u67d0\u4e2a\u7ed3\u679c\u4e4b\u540e\u7684 3 \u884c<\/li><li>seq 10 | grep &#8220;5&#8221; -B 3 \u663e\u793a\u5339\u914d\u67d0\u4e2a\u7ed3\u679c\u4e4b\u524d\u7684 3 \u884c<\/li><li>seq 10 | grep &#8220;5&#8221; -C 3 \u663e\u793a\u5339\u914d\u67d0\u4e2a\u7ed3\u679c\u7684\u524d\u4e09\u884c\u548c\u540e\u4e09\u884c<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">join<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>join file1 file2 \u5c06\u4e24\u4e2a\u6587\u4ef6\u4e2d\uff0c\u6307\u5b9a\u680f\u4f4d\u5185\u5bb9\u76f8\u540c\u7684\u884c\u8fde\u63a5\u8d77\u6765<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">tr<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>cat text | tr &#8216;\\t&#8217; &#8216; &#8216; \u5c06\u5236\u8868\u7b26\u66ff\u6362\u6210\u7a7a\u683c<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">vim<\/h4>\n\n\n\n<h6 class=\"wp-block-heading\">\u4e09\u79cd\u6a21\u5f0f\uff1a<\/h6>\n\n\n\n<ul class=\"wp-block-list\"><li>\u7f16\u8f91\u6a21\u5f0f\uff08\u547d\u4ee4\u6a21\u5f0f\uff09<\/li><li>\u8f93\u5165\u6a21\u5f0f<\/li><li>\u672b\u884c\u6a21\u5f0f\u6a21\u5f0f\u7684\u8f6c\u6362\u7f16\u8f91 -&gt; \u8f93\u5165<code>i: \u5728\u5f53\u524d\u5149\u6807\u6240\u5728\u5b57\u7b26\u7684\u524d\u9762\uff0c\u8f6c\u4e3a\u8f93\u5165\u6a21\u5f0f\uff1b\n\na: \u5728\u5f53\u524d\u5149\u6807\u6240\u5728\u5b57\u7b26\u7684\u540e\u9762\uff0c\u8f6c\u4e3a\u8f93\u5165\u6a21\u5f0f\uff1b\n\no: \u5728\u5f53\u524d\u5149\u6807\u6240\u5728\u884c\u7684\u4e0b\u65b9\uff0c\u65b0\u5efa\u4e00\u884c\uff0c\u5e76\u8f6c\u4e3a\u8f93\u5165\u6a21\u5f0f\uff1b\n\nI\uff1a\u5728\u5f53\u524d\u5149\u6807\u6240\u5728\u884c\u7684\u884c\u9996\uff0c\u8f6c\u6362\u4e3a\u8f93\u5165\u6a21\u5f0f\n\nA\uff1a\u5728\u5f53\u524d\u5149\u6807\u6240\u5728\u884c\u7684\u884c\u5c3e\uff0c\u8f6c\u6362\u4e3a\u8f93\u5165\u6a21\u5f0f\n\nO\uff1a\u5728\u5f53\u524d\u5149\u6807\u6240\u5728\u884c\u7684\u4e0a\u65b9\uff0c\u65b0\u5efa\u4e00\u884c\uff0c\u5e76\u8f6c\u4e3a\u8f93\u5165\u6a21\u5f0f\uff1b<\/code>\u8f93\u5165 -&gt; \u7f16\u8f91<code>ESC<\/code>\u7f16\u8f91 -&gt; \u672b\u884c\uff1a<code>:<\/code>\u672b\u884c -&gt; \u7f16\u8f91\uff1a<code>ESC,ESC<\/code>\u6253\u5f00\u6587\u4ef6<code>vim +# :\u6253\u5f00\u6587\u4ef6\uff0c\u5e76\u5b9a\u4f4d\u4e8e\u7b2c#\u884c\n\nvim +\uff1a\u6253\u5f00\u6587\u4ef6\uff0c\u5b9a\u4f4d\u81f3\u6700\u540e\u4e00\u884c\n\nvim +\/PATTERN : \u6253\u5f00\u6587\u4ef6\uff0c\u5b9a\u4f4d\u81f3\u7b2c\u4e00\u6b21\u88abPATTERN\u5339\u914d\u5230\u7684\u884c\u7684\u884c\u9996<\/code>\u5173\u95ed\u6587\u4ef6<code>:q  \u9000\u51fa\n\n:wq \u4fdd\u5b58\u5e76\u9000\u51fa\n\n:q! \u4e0d\u4fdd\u5b58\u5e76\u9000\u51fa\n\n:w \u4fdd\u5b58\n\n:w! \u5f3a\u884c\u4fdd\u5b58<\/code>\u79fb\u52a8\u5149\u6807\uff08\u7f16\u8f91\u6a21\u5f0f\uff09<\/li><li>\u9010\u5b57\u7b26\u79fb\u52a8<code>h: \u5de6\n\nl: \u53f3\n\nj: \u4e0b\n\nk: \u4e0a\n\n#h: \u79fb\u52a8#\u4e2a\u5b57\u7b26<\/code><\/li><li>\u4ee5\u5355\u8bcd\u4e3a\u5355\u4f4d\u79fb\u52a8<code>w: \u79fb\u81f3\u4e0b\u4e00\u4e2a\u5355\u8bcd\u7684\u8bcd\u9996\n\ne: \u8df3\u81f3\u5f53\u524d\u6216\u4e0b\u4e00\u4e2a\u5355\u8bcd\u7684\u8bcd\u5c3e\n\nb: \u8df3\u81f3\u5f53\u524d\u6216\u524d\u4e00\u4e2a\u5355\u8bcd\u7684\u8bcd\u9996\n\n#w: \u79fb\u52a8#\u4e2a\u5355\u8bcd<\/code><\/li><li>\u884c\u5185\u8df3\u8f6c<code>0: \u7edd\u5bf9\u884c\u9996\n\n^: \u884c\u9996\u7684\u7b2c\u4e00\u4e2a\u975e\u7a7a\u767d\u5b57\u7b26\n\n$: \u7edd\u5bf9\u884c\u5c3e<\/code><\/li><li>\u884c\u95f4\u8df3\u8f6c<code>#G\uff1a\u8df3\u8f6c\u81f3\u7b2c#\u884c\n\ngg: \u7b2c\u4e00\u884c\n\nG\uff1a\u6700\u540e\u4e00\u884c<\/code>\u7ffb\u5c4f<code>Ctrl+f: \u5411\u4e0b\u7ffb\u4e00\u5c4f\n\nCtrl+b: \u5411\u4e0a\u7ffb\u4e00\u5c4f\n\nCtrl+d: \u5411\u4e0b\u7ffb\u534a\u5c4f\n\nCtrl+u: \u5411\u4e0a\u7ffb\u534a\u5c4f<\/code>\u5220\u9664\u5355\u4e2a\u5b57\u7b26<code>x: \u5220\u9664\u5149\u6807\u6240\u5728\u5904\u7684\u5355\u4e2a\u5b57\u7b26\n\n#x: \u5220\u9664\u5149\u6807\u6240\u5728\u5904\u53ca\u5411\u540e\u7684\u5171#\u4e2a\u5b57\u7b26<\/code>\u5220\u9664\u547d\u4ee4: d<code>dd: \u5220\u9664\u5f53\u524d\u5149\u6807\u6240\u5728\u884c\n#dd: \u5220\u9664\u5305\u62ec\u5f53\u524d\u5149\u6807\u6240\u5728\u884c\u5728\u5185\u7684#\u884c\uff1b<\/code>\u64a4\u6d88\u7f16\u8f91\u64cd\u4f5c<code>u\uff1a\u64a4\u6d88\u524d\u4e00\u6b21\u7684\u7f16\u8f91\u64cd\u4f5c\n\n#u: \u76f4\u63a5\u64a4\u6d88\u6700\u8fd1#\u6b21\u7f16\u8f91\u64cd\u4f5c\n\n\u8fde\u7eedu\u547d\u4ee4\u53ef\u64a4\u6d88\u6b64\u524d\u7684n\u6b21\u7f16\u8f91\u64cd\u4f5c\n\n\u64a4\u6d88\u6700\u8fd1\u4e00\u6b21\u64a4\u6d88\u64cd\u4f5c\uff1aCtrl+r<\/code>\u67e5\u627e<code>\/PATTERN\n\n?PATTERN\n\nn \u4e0b\u4e00\u4e2a\n\nN \u4e0a\u4e00\u4e2a<\/code><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u6587\u4ef6\u538b\u7f29 &amp; \u89e3\u538b\u7f29\uff083 \u4e2a\uff09<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">tar<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>tar zxvf FileName.tar.gz \u89e3\u538b<\/li><li>tar zcvf FileName.tar.gz DirName \u538b\u7f29<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">zip<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>zip -r html.zip\/home\/html \u9012\u5f52\u538b\u7f29<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">unzip<\/h4>\n\n\n\n<p>unzip test.zip -d \/tmp \u89e3\u538b\u5230\u6307\u5b9a\u76ee\u5f55\u4e0b<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4fe1\u606f\u663e\u793a\uff0811 \u4e2a\uff09<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">uname<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>uname -a \u663e\u793a\u7cfb\u7edf\u5168\u90e8\u4fe1\u606f<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">hostname<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>hostname \u663e\u793a\u4e3b\u673a\u540d<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">dmesg<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>dmesg \u663e\u793a\u5f00\u673a\u4fe1\u606f<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">uptime<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>uptime \u663e\u793a\u7cfb\u7edf\u8fd0\u884c\u65f6\u95f4\u53ca\u8d1f\u8f7d<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">stat<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>stat \u663e\u793a\u6587\u4ef6\u7684\u72b6\u6001\u4fe1\u606f<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">du<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>du -sh \u663e\u793a\u8def\u5f84\u4e0b\u6240\u6709\u6587\u4ef6\u5927\u5c0f<\/li><li>du -sh local \u663e\u793a\u8def\u5f84\u4e0b local \u76ee\u5f55\u6587\u4ef6\u5927\u5c0f<\/li><li>du -sh * \u663e\u793a\u8def\u5f84\u4e0b\u6240\u6709\u76ee\u5f55\u6587\u4ef6\u5927\u5c0f<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">df<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>df -h \u663e\u793a\u7cfb\u7edf\u78c1\u76d8\u7a7a\u95f4\u7684\u4f7f\u7528\u60c5\u51b5<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">top<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>top \u5b9e\u65f6\u663e\u793a\u7cfb\u7edf\u8d44\u6e90\u4f7f\u7528\u60c5\u51b5<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">free<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>free -m \u4ee5 M \u4e3a\u5355\u4f4d\u67e5\u770b\u7cfb\u7edf\u5185\u5b58<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">date<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>date +&#8221;%Y-%m-%d&#8221; 2019-05-28<\/li><li>date -d &#8220;1 day ago&#8221; +&#8221;% Y-% m-% d&#8221; \u8f93\u51fa\u6628\u5929\u65e5\u671f<\/li><li>date -d &#8220;+1 day&#8221; +% Y% m% d \u663e\u793a\u524d\u4e00\u5929\u7684\u65e5\u671f<\/li><li>date -d &#8220;-1 day&#8221; +% Y% m% d \u663e\u793a\u540e\u4e00\u5929\u7684\u65e5\u671f<\/li><li>date -d &#8220;-1 month&#8221; +% Y% m% d \u663e\u793a\u4e0a\u4e00\u6708\u7684\u65e5\u671f<\/li><li>date -d &#8220;+1 month&#8221; +% Y% m% d \u663e\u793a\u4e0b\u4e00\u6708\u7684\u65e5\u671f<\/li><li>date -d &#8220;-1 year&#8221; +% Y% m% d \u663e\u793a\u524d\u4e00\u5e74\u7684\u65e5\u671f<\/li><li>date -d &#8220;+1 year&#8221; +% Y% m% d \u663e\u793a\u4e0b\u4e00\u5e74\u7684\u65e5\u671f<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">cal<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>cal \u65e5\u5386\u4fe1\u606f<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u641c\u7d22\u6587\u4ef6\uff084 \u4e2a\uff09<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">which<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>which pwd \u663e\u793a\u547d\u4ee4\u8def\u5f84<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">find<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>find \/-name &#8216;target&#8217; \u67e5\u8be2\u6839\u76ee\u5f55\u4e0b\u9762\u6587\u4ef6\u540d\u4e3a target \u7684\u6587\u4ef6<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">whereis<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>whereis php \u67e5\u627e\u4e8c\u8fdb\u5236\u547d\u4ee4<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">locate<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>locate target \u4ece\u6570\u636e\u5e93 (\/var\/lib\/mlocate\/mlocate.db) \u67e5\u627e\u76ee\u6807\u6587\u4ef6\uff0c\u4f7f\u7528 updatedb \u66f4\u65b0\u5e93<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u8fdb\u7a0b\u7ba1\u7406\uff0811 \u4e2a\uff09<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">jobs<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>jobs \u67e5\u770b\u5f53\u524d\u6709\u591a\u5c11\u5728\u540e\u53f0\u8fd0\u884c\u7684\u547d\u4ee4<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">bg<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>bg 1 \u5c06\u4e00\u4e2a\u5728\u540e\u53f0\u6682\u505c\u7684\u547d\u4ee4\uff0c\u7ee7\u7eed\u6267\u884c\uff0c1 \u4e3a\u4f5c\u4e1a\u53f7<br \/>\uff08ctrl+z\uff09\u53ef\u4ee5\u6302\u8d77\u7a0b\u5e8f\uff0c\u8fd4\u56de\u4f5c\u4e1a\u53f7<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">fg<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>fg 1 \u5c06\u540e\u53f0\u4e2d\u7684\u547d\u4ee4\u8c03\u81f3\u524d\u53f0\u7ee7\u7eed\u8fd0\u884c \uff0c1 \u4e3a\u4f5c\u4e1a\u53f7<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">kill<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>kill \u8fdb\u7a0b\u53f7 \u6740\u8fdb\u7a0b<\/li><li>kill -9 \u8fdb\u7a0b\u53f7 \u5f3a\u6740\u8fdb\u7a0b<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">killall<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>killall php \u901a\u8fc7\u8fdb\u7a0b\u540d\u5b57\u6740\u8fdb\u7a0b<\/li><li>killall -9 php \u901a\u8fc7\u8fdb\u7a0b\u540d\u5b57\u5f3a\u6740\u8fdb\u7a0b<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">pkill<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>\u7528\u6cd5\u540c\u4e0a<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">crontab<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>crontab -l \u67e5\u770b\u5b9a\u65f6\u4efb\u52a1<\/li><li>crontab -e \u7f16\u8f91\u5b9a\u65f6\u4efb\u52a1<\/li><li>crontab -l -u user1 \u67e5\u770b user1 \u5b9a\u65f6\u4efb\u52a1\uff0c\u53ea\u6709 root \u624d\u6709\u6743\u9650<\/li><li>crontab -e -u user1 \u7f16\u8f91 user1 \u5b9a\u65f6\u4efb\u52a1\uff0c\u53ea\u6709 root \u624d\u6709\u6743\u9650<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">ps<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>ps -ef \u67e5\u770b\u8fdb\u7a0b\uff0c\u663e\u793a UID,PPIP,C \u4e0e STIME\uff0c\u6bcf\u4e2a\u7a0b\u5e8f\u6240\u4f7f\u7528\u7684\u73af\u5883\u53d8\u91cf\u680f\u4f4d<\/li><li>ps -axu \u67e5\u770b\u6240\u6709\u8fdb\u7a0b\uff0c\u5e76\u663e\u793a\u5c5e\u4e8e\u7528\u6237<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">pstree<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>pstree -p \u663e\u793a\u5f53\u524d\u6240\u6709\u8fdb\u7a0b\u7684\u8fdb\u7a0b\u53f7\u548c\u8fdb\u7a0b id \u6811<\/li><li>pstree -a \u663e\u793a\u6240\u6709\u8fdb\u7a0b\u7684\u6240\u6709\u8be6\u7ec6\u4fe1\u606f\u6811<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">nohup<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>nohup command &amp; \u9000\u51fa\u8d26\u6237\u65f6\u4e0d\u6302\u65ad\u7a0b\u5e8f\uff0c\u4ecd\u5728\u540e\u53f0\u8fd0\u884c<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">pgrep<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>pgrep -l httpd \u67e5\u627e http \u76f8\u5173\u7684\u8fdb\u7a0b\u53f7<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u7528\u6237\u7ba1\u7406\uff087 \u4e2a\uff09<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">useradd<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>useradd boy -u 888 \u5efa\u7acb\u4e00\u4e2a\u65b0\u7528\u6237\u8d26\u6237\uff0c\u5e76\u8bbe\u7f6e ID<\/li><li>useradd \u2013g sales jack \u2013G company,employees<br \/>-g\uff1a\u52a0\u5165\u4e3b\u8981\u7ec4 -G\uff1a\u52a0\u5165\u6b21\u8981\u7ec4<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">usermod<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>usermod -G staff newuser2 \u5c06 newuser2 \u6dfb\u52a0\u5230\u7ec4 staff \u4e2d<\/li><li>usermod -l newuser1 newuser \u4fee\u6539 newuser \u7684\u7528\u6237\u540d\u4e3a newuser1<\/li><li>usermod -L newuser1 \u9501\u5b9a\u8d26\u53f7 newuser1<\/li><li>usermod -U newuser1 \u89e3\u9664\u5bf9 newuser1 \u7684\u9501\u5b9a<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">userdel<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>userdel -f user1 \u5f3a\u5236\u5220\u9664\u7528\u6237<\/li><li>userdel -r user1 \u5220\u9664\u7528\u6237\u7684\u540c\u65f6\uff0c\u5220\u9664\u4e0e\u7528\u6237\u76f8\u5173\u7684\u6240\u6709\u6587\u4ef6<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">groupadd<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>groupadd -g 1000 group1 \u5efa\u7acb\u4e00\u4e2a\u65b0\u7ec4\uff0c\u5e76\u8bbe\u7f6e\u7ec4 ID \u52a0\u5165\u7cfb\u7edf<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">passwd<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>passwd user1 \u4fee\u6539 user1 \u5bc6\u7801<\/li><li>passwd -l user1 \u9501\u4f4f\u5bc6\u7801<\/li><li>passwd -d user1 \u5220\u9664\u5bc6\u7801<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">su<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>su root \u5207\u6362\u8eab\u4efd<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">sudo<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>sudo command \u5df2\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u547d\u4ee4<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u7f51\u7edc\u64cd\u4f5c\uff0811 \u4e2a\uff09<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">telnet<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>telnet 127.0.0.1 \u767b\u5f55\u8fdc\u7a0b\u4e3b\u673a<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">ssh<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>ssh root@127.0.0.1 -p22 \u767b\u5f55\u8fdc\u7a0b\u4e3b\u673a<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">scp<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>scp local_file remote_username@remote_ip:remote_folder \u672c\u5730\u62f7\u8d1d\u5230\u8fdc\u7a0b<\/li><li>scp remote_username@remote_ip:remote_folder local_file \u8fdc\u7a0b\u62f7\u8d1d\u5230\u672c\u5730<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">wget<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>wget url \u4e0b\u8f7d\u4e00\u4e2a\u6587\u4ef6<\/li><li>wget &#8211;limit-rate=300k url \u9650\u901f\u4e0b\u8f7d<\/li><li>wget -c url \u65ad\u70b9\u7eed\u4f20<\/li><li>wget -b url \u540e\u53f0\u4e0b\u8f7d<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">ping<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>ping www.baidu.com -c 2 \u6536\u5230\u4e24\u4e2a\u5305\u5c31\u7ed3\u675f<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">route<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>route \u663e\u793a\u5f53\u524d\u8def\u7531<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">ifconfig<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>ifconfig \u67e5\u770b\u3001\u914d\u7f6e\u3001\u542f\u7528\u6216\u7981\u7528\u7f51\u7edc\u63a5\u53e3<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">ifup<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>ifup eth0 \u5f00\u542f eth0 \u7f51\u5361<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">ifdown<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>ifdown eth0 \u5173\u95ed eth0 \u7f51\u5361<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">netstat<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>netstat -at \u5217\u51fa\u6240\u6709 tcp \u7aef\u53e3<\/li><li>netstat -au \u5217\u51fa\u6240\u6709 udp \u7aef\u53e3<\/li><li>netstat -l \u53ea\u663e\u793a\u76d1\u542c\u7aef\u53e3<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">ss<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>ss -t -a \u663e\u793a\u6240\u6709 tcp \u94fe\u63a5<\/li><li>ss -l \u663e\u793a\u5904\u4e8e\u76d1\u542c\u72b6\u6001\u7684\u5957\u63a5\u5b57<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u78c1\u76d8 &amp; \u6587\u4ef6\u7cfb\u7edf\uff087 \u4e2a\uff09<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">mount<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>mount \/dev\/hda1 \/mnt \u5c06 \/dev\/hda1 \u6302\u8f7d\u5230 \/mnt \u76ee\u5f55\u4e0b<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">umount<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>umount -v \/mnt\/mymount\/ \u5378\u8f7d \/mnt\/mymount\/<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">fsck<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>fsck -y \/dev\/hda2 \u68c0\u67e5\u5e76\u4fee\u590d Linux \u6587\u4ef6\u7cfb\u7edf<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">dumpe2fs<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>dumpe2fs \/dev\/hda1 \u67e5\u770b\u6587\u4ef6\u7cfb\u7edf\u4fe1\u606f<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">dump<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>\u200ddump -0u -f \/tmp\/homeback.bak \/home<br \/>\u5c06 \/home \u76ee\u5f55\u6240\u6709\u5185\u5bb9\u5907\u4efd\u5230 \/tmp\/homeback.bak \u6587\u4ef6\u4e2d\uff0c\u5907\u4efd\u5c42\u7ea7\u4e3a 0 \u5e76\u5728 \/etc\/dumpdates \u4e2d\u8bb0\u5f55\u76f8\u5173\u4fe1\u606f<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">fdisk<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>fdisk \/dev\/sdb<br \/>\u8f93\u5165 m \u5217\u51fa\u53ef\u4ee5\u6267\u884c\u7684\u547d\u4ee4<br \/>\u8f93\u5165 p \u5217\u51fa\u78c1\u76d8\u76ee\u524d\u7684\u5206\u533a\u60c5\u51b5<br \/>\u8f93\u5165 d \u7136\u540e\u9009\u62e9\u5206\u533a\uff0c\u5220\u9664\u73b0\u6709\u5206\u533a<br \/>\u8f93\u5165 print \u67e5\u770b\u5206\u533a\u60c5\u51b5\uff0c\u786e\u8ba4\u5206\u533a\u5df2\u7ecf\u5220\u9664<br \/>\u8f93\u5165 n \u5efa\u7acb\u65b0\u7684\u78c1\u76d8\u5206\u533a<br \/>\u8f93\u5165 w \u6700\u540e\u5bf9\u5206\u533a\u64cd\u4f5c\u8fdb\u884c\u4fdd\u5b58<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">mkfs<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>mkfs -t ext3 \/dev\/sda6 \u5c06 sda6 \u5206\u533a\u683c\u5f0f\u5316\u4e3a ext3 \u683c\u5f0f<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u7cfb\u7edf\u6743\u9650\uff083 \u4e2a\uff09<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">chmod<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>chmod 777 file1 \u4fee\u6539 file1 \u6587\u4ef6\u6743\u9650\u4e3a 777<\/li><li>chmod u+x,g+w file1 \u4e3a file1 \u8bbe\u7f6e\u81ea\u5df1\u53ef\u4ee5\u6267\u884c\uff0c\u7ec4\u5458\u53ef\u4ee5\u5199\u5165\u7684\u6743\u9650<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">chown<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>chown -R root \/usr\/meng \u4fee\u6539\u5c06\u76ee\u5f55 \/usr\/meng \u53ca\u5176\u4e0b\u9762\u7684\u6240\u6709\u6587\u4ef6\u3001\u5b50\u76ee\u5f55\u7684\u6587\u4ef6\u4e3b\u6539\u6210 root<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">chgrp<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>chgrp -R mengxin \/usr\/meng \u5c06 \/usr\/meng \u53ca\u5176\u5b50\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\u7684\u7528\u6237\u7ec4\u6539\u4e3a mengxin<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u5173\u673a\u91cd\u542f\uff085 \u4e2a\uff09<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">shutdown<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>shutdown -h now \u7acb\u5373\u5173\u673a<\/li><li>shutdown +5 &#8220;System will shutdown after 5 minutes&#8221; \u6307\u5b9a 5 \u5206\u949f\u540e\u5173\u673a\uff0c\u540c\u65f6\u9001\u51fa\u8b66\u544a\u4fe1\u606f\u7ed9\u767b\u5165\u7528\u6237<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">halt<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>halt -p \u5173\u95ed\u7cfb\u7edf\u540e\u5173\u95ed\u7535\u6e90<\/li><li>halt -d \u5173\u95ed\u7cfb\u7edf\uff0c\u4f46\u4e0d\u7559\u4e0b\u7eaa\u5f55<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">poweroff<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>poweroff -f \u5f3a\u5236\u5173\u95ed\u64cd\u4f5c\u7cfb\u7edf<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">logout<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>logout \u9000\u51fa\u5f53\u524d\u767b\u5f55\u7684 Shell<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">exit<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>exit \u9000\u51fa\u5f53\u524d\u767b\u5f55\u7684 Shell<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u5176\u4ed6\uff086 \u4e2a\uff09<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">echo<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>echo &#8216;hello&#8217; \u6253\u5370\u5b57\u7b26\u4e32\u3001\u53d8\u91cf<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">print<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>printf &#8216;hell0&#8217; \u683c\u5f0f\u5316\u8f93\u51fa\u5b57\u7b26\u4e32<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">rpm<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>rpm -ivh your-package.rpm \u5b89\u88c5 rpm \u5305<\/li><li>rpm -Uvh your-package.rpm \u5347\u7ea7 rpm \u5305<\/li><li>rpm -e package \u5378\u8f7d<\/li><li>rpm -qa \u5217\u51fa\u6240\u6709\u5b89\u88c5\u8fc7\u7684\u5305<\/li><li>rpm -ql \u5305\u540d rpm \u5305\u4e2d\u7684\u6587\u4ef6\u5b89\u88c5\u5230\u90a3\u91cc\u53bb<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">yum<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>yum install php \u5b89\u88c5 php<\/li><li>yum remove php \u5378\u8f7d php<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">clear<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>clear \u6e05\u5c4f<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">history<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>history 10 \u6700\u8fd1\u4f7f\u7528\u7684 10 \u6761\u5386\u53f2\u547d\u4ee4<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00 \u672c\u6587\u6536\u5f55\u4e86 linux \u5e38\u7528\u6307\u4ee4\uff0c\u8fd9\u91cc\u9762\u6709\u4e2a\u5c0f\u6280\u5de7\uff0c\u57fa\u672c\u4e0a\u6240\u6709\u6307\u4ee4\u540e\u9762\u8ddf\u4e0a &#8211;h \u53ef\u4ee5\u663e\u793a\u5176\u4f7f\u7528\u65b9\u6cd5\u3002\u6545\u4e0d\u5fc5\u6b7b\u8bb0\u786c\u80cc\uff0c\u77e5\u5176\u610f\u4e43\u901a\u5176\u5f62\u3002 \u5206\u7c7b\u5982\u4e0b\uff1a \u6587\u4ef6 &amp; \u76ee\u5f55\u64cd\u4f5c\uff0816 \u4e2a\uff09 \u67e5\u770b\u6587\u4ef6 &amp; \u5185\u5bb9\u5904\u7406\uff0818 \u4e2a\uff09 \u6587\u4ef6\u538b\u7f29 &amp; \u89e3\u538b\u7f29\uff083 \u4e2a\uff09 \u4fe1\u606f\u663e\u793a\uff0811 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1236","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts\/1236","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1236"}],"version-history":[{"count":0,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts\/1236\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}