﻿{"id":891,"date":"2014-05-31T19:36:24","date_gmt":"2014-05-31T11:36:24","guid":{"rendered":"http:\/\/notes.zerobox.org\/?p=891"},"modified":"2014-05-31T19:36:24","modified_gmt":"2014-05-31T11:36:24","slug":"20%e4%b8%aa%e6%9c%80%e5%8f%97%e6%ac%a2%e8%bf%8e%e7%9a%84linux%e5%91%bd%e4%bb%a4","status":"publish","type":"post","link":"http:\/\/zerobox.org\/notes\/891.html","title":{"rendered":"20\u4e2a\u6700\u53d7\u6b22\u8fce\u7684Linux\u547d\u4ee4"},"content":{"rendered":"<p>\u672c\u6587\u6839\u636e commandlinefu \u7f51\u7ad9\u7684\u5386\u53f2\u6392\u540d\uff0c\u7b5b\u9009\u51fa\u4e86\u524d 20 \u4e2a\u5f97\u7968\u6700\u9ad8\u7684 Linux \u547d\u4ee4\u3002\u770b\u770b\u4f60\u90fd\u80fd\u719f\u7ec3\u4f7f\u7528\u4e86\u5417\uff1f<\/p>\n<p><strong>\u3000\u30001\u3001\u4ee5 root \u5e10\u6237\u6267\u884c\u4e0a\u4e00\u6761\u547d\u4ee4<\/strong><\/p>\n<blockquote><p>sudo !!<\/p><\/blockquote>\n<p><strong>\u30002\u3001\u5229\u7528 Python \u642d\u5efa\u4e00\u4e2a\u7b80\u5355\u7684 Web \u670d\u52a1\u5668\uff0c\u53ef\u901a\u8fc7<strong><a>http:\/\/$HOSTNAME:8000<\/a><\/strong>\u8bbf\u95ee\u00a0\u00a0\u00a0\u00a0 \u00a0<\/strong><\/p>\n<blockquote><p>python -m SimpleHTTPServer<\/p><\/blockquote>\n<p><strong>\u3000\u30003\u3001\u5207\u6362\u5230\u4e0a\u4e00\u6b21\u8bbf\u95ee\u7684\u76ee\u5f55<\/strong><\/p>\n<blockquote><p>cd &#8211;<\/p><\/blockquote>\n<p><strong>\u3000\u30004\u3001\u5c06\u4e0a\u4e00\u6761\u547d\u4ee4\u4e2d\u7684 foo \u66ff\u6362\u4e3a bar\uff0c\u5e76\u6267\u884c<\/strong><\/p>\n<blockquote><p>^foo^bar<\/p><\/blockquote>\n<p><strong>\u3000\u30005\u3001traceroute + ping\u00a0 \u00a0<\/strong><\/p>\n<blockquote><p>mtr google.com<\/p><\/blockquote>\n<p><strong>\u3000\u3000 6\u3001\u5feb\u901f\u8c03\u7528\u4e00\u4e2a\u7f16\u8f91\u5668\u6765\u7f16\u5199\u4e00\u4e2a\u547d\u4ee4<\/strong><\/p>\n<blockquote><p>ctrl-x e<\/p><\/blockquote>\n<p><strong>\u3000\u30007\u3001\u6267\u884c\u4e00\u4e2a\u547d\u4ee4\uff0c\u4f46\u4e0d\u4fdd\u5b58\u5728\u547d\u4ee4\u5386\u53f2\u8bb0\u5f55\u4e2d<\/strong><\/p>\n<blockquote><p>command<\/p><\/blockquote>\n<p><strong>\u3000\u3000 8\u3001\u91cd\u65b0\u521d\u59cb\u5316\u7ec8\u7aef<\/strong><\/p>\n<blockquote><p>reset<\/p><\/blockquote>\n<p><strong>\u3000\u30009\u3001\u8c03\u51fa\u4e0a\u6b21\u547d\u4ee4\u4f7f\u7528\u7684\u53c2\u6570<\/strong><\/p>\n<blockquote><p>&#8216;ALT+.&#8217; or &#8216;\u00a0.&#8217;<\/p><\/blockquote>\n<p><strong>\u3000\u300010\u3001\u4ee5\u66f4\u52a0\u6e05\u6670\u7684\u65b9\u5f0f\u663e\u793a\u5f53\u524d\u7cfb\u7edf\u6302\u8f7d\u7684\u6587\u4ef6\u7cfb\u7edf<\/strong><\/p>\n<blockquote><p>mount\u00a0 column -t<\/p><\/blockquote>\n<p><strong>\u300011\u3001\u5728\u7ed9\u5b9a\u7684\u65f6\u95f4\u6267\u884c\u547d\u4ee4<\/strong><\/p>\n<blockquote><p>echo &#8220;ls -l&#8221;\u00a0 at midnight<\/p><\/blockquote>\n<p><strong>\u3000\u300012\u3001\u901a\u8fc7 DNS \u63a7\u5236\u53f0\u67e5\u8be2\u7ef4\u57fa\u767e\u79d1<\/strong><\/p>\n<blockquote><p>dig +short txt\u00a0.wp.dg.cx<\/p><\/blockquote>\n<p><strong>\u3000\u300013\u3001\u4ece 80 \u7aef\u53e3\u5411\u4f60\u672c\u5730\u7684 2001 \u7aef\u53e3\u5f00\u542f\u96a7\u9053<\/strong><\/p>\n<blockquote><p>ssh -N -L2001:localhost:80 somemachine<\/p><\/blockquote>\n<p><strong>\u3000\u300014\u3001\u5feb\u901f\u8bbf\u95ee ASCII \u8868<\/strong><\/p>\n<blockquote><p>man ascii<\/p><\/blockquote>\n<p><strong>\u3000\u300015\u3001\u83b7\u53d6\u4f60\u7684\u5916\u90e8 IP \u5730\u5740<\/strong><\/p>\n<blockquote><p>curl ifconfig.me<\/p><\/blockquote>\n<p><strong>\u300016\u3001!! \u8868\u793a\u91cd\u590d\u6267\u884c\u4e0a\u4e00\u6761\u547d\u4ee4\uff0c\u5e76\u7528 :gs\/foo\/bar \u8fdb\u884c\u66ff\u6362\u64cd\u4f5c<\/strong><\/p>\n<blockquote><p>!!:gs\/foo\/bar<\/p><\/blockquote>\n<p><strong>\u3000\u300017\u3001\u8f93\u51fa\u4f60\u7684\u9ea6\u514b\u98ce\u5230\u8fdc\u7a0b\u673a\u5668\u7684\u626c\u58f0\u5668<\/strong><\/p>\n<blockquote><p>dd if=\/dev\/dsp\u00a0 ssh -c arcfour -C username@host dd of=\/dev\/dsp<\/p><\/blockquote>\n<p><strong>\u300018\u3001\u6302\u8f7d\u4e00\u4e2a\u4e34\u65f6\u7684\u5185\u5b58\u5206\u533a<\/strong><\/p>\n<blockquote><p>mount -t tmpfs tmpfs \/mnt -o size=1024m<\/p><\/blockquote>\n<p><strong>19\u3001\u4ee5 SSH \u65b9\u5f0f\u6302\u8f7d\u76ee\u5f55\/\u6587\u4ef6\u7cfb\u7edf<\/strong><\/p>\n<blockquote><p>sshfs name@server:\/path\/to\/folder \/path\/to\/mount\/point<\/p><\/blockquote>\n<p><strong>\u3000\u300020\u3001\u901a\u8fc7 curl \u66f4\u65b0 Twitter<\/strong><\/p>\n<blockquote><p>curl -u user:pass -d status=&#8221;Tweeting from the shell&#8221;\u00a0<a>http:\/\/twitter.com\/statuses\/update.xml<\/a><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u6839\u636e commandlinefu \u7f51\u7ad9\u7684\u5386\u53f2\u6392\u540d\uff0c\u7b5b\u9009\u51fa\u4e86\u524d 20 \u4e2a\u5f97\u7968\u6700 &hellip;<\/p>\n<p class=\"read-more\"><a href=\"http:\/\/zerobox.org\/notes\/891.html\">\u7ee7\u7eed\u9605\u8bfb &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[29],"class_list":["post-891","post","type-post","status-publish","format-standard","hentry","tag-linux-2"],"views":429,"_links":{"self":[{"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/posts\/891","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/comments?post=891"}],"version-history":[{"count":0,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/posts\/891\/revisions"}],"wp:attachment":[{"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/media?parent=891"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/categories?post=891"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/zerobox.org\/notes\/wp-json\/wp\/v2\/tags?post=891"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}