{"id":1138,"date":"2014-09-04T16:11:05","date_gmt":"2014-09-04T16:11:05","guid":{"rendered":"http:\/\/ixyzero.com\/blog\/?p=1138"},"modified":"2014-09-04T16:11:05","modified_gmt":"2014-09-04T16:11:05","slug":"linux-%e5%91%bd%e4%bb%a4%e8%a1%8c%e4%b8%8b%e7%9a%84%e5%a5%bd%e4%b8%9c%e8%a5%bfbak","status":"publish","type":"post","link":"https:\/\/ixyzero.com\/blog\/archives\/1138.html","title":{"rendered":"Linux \u547d\u4ee4\u884c\u4e0b\u7684\u597d\u4e1c\u897f[bak]"},"content":{"rendered":"<p>\u56e0\u4e3a\u8fd1\u671f\u4e8b\u60c5\u8f83\u591a\uff0c\u4e5f\u6ca1\u4ec0\u4e48\u65f6\u95f4\u6765\u9ad8\u9891\u7387\u7684\u66f4\u65b0\u6587\u7ae0\uff08\u800c\u4e14\u81ea\u5df1\u672c\u8eab\u4e5f\u5c31\u5904\u5728\u4e00\u4e2a\u5b66\u4e60\u7684\u9636\u6bb5\/\u72b6\u6001\uff0c\u8981\u60f3\u4e00\u76f4\u63d0\u9ad8\u5c31\u5f97\u4e0d\u505c\u7684\u770b\u4e66\u5b66\u4e60\uff0c\u66f4\u65b0blog\u5c31\u5f97\u770b\u7f18\u5206\u4e86\uff09\uff0c\u8fd9\u6b21\u662f\u4e4b\u524d\u770b\u5230\u7684\u4e0d\u9519\u7684\u6587\u7ae0\uff0c\u5148\u6458\u6284\u8fc7\u6765\uff08\u7a0d\u4f5c\u4fee\u6539\uff09\uff0c\u7136\u540e\u6162\u6162\u603b\u7ed3\u81ea\u5df1\u5728\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u7684\u7ecf\u9a8c\uff0c\u878d\u5165\u6587\u7ae0\u3002<\/p>\n<hr \/>\n<p>\u5217\u4e3e\u4f60\u53ef\u80fd\u6ca1\u6ce8\u610f\u8fc7\u7684\u597d\u7528\u7684 Linux \u547d\u4ee4\u884c\u547d\u4ee4<\/p>\n<p style=\"color: #2f2f2f;\">\u73b0\u5728\u505a\u7f51\u7ad9\u505a\u79fb\u52a8\u5e94\u7528\u6700\u8bb2\u7a76\u7684\u5c31\u662f\u63a8\u5e7f\u4e86\uff0c\u63a8\u5e7f\u505a\u7684\u597d\u90a3\u5c31\u6210\u529f\u4e86\u4e00\u5927\u534a\uff0c\u76f8\u5bf9\u7684\u6ca1\u66dd\u5149\u4ea7\u54c1\u518d\u597d\u4e5f\u5f88\u96be\u505a\u4e0b\u53bb\u3002\u5c31\u8fd9\u4e2a\u89d2\u5ea6\u800c\u8a00\u7edd\u5927\u591a\u6570 Linux \u547d\u4ee4\u884c\u7684\u63a8\u5e7f\u7b80\u76f4\u662f\u70c2\u900f\u4e86\u3002\u7e41\u591a Linux \u6709\u7528\u6781\u4e86\u7684\u547d\u4ee4\u884c\u5de5\u5177\u5c31\u9759\u9759\u7684\u8eba\u5728\u4f60\u53d1\u884c\u7248\u9ed8\u8ba4\u5b89\u88c5\u7684\u5305\u88f9\u91cc\uff0c\u5f88\u591a\u65f6\u5019\u53ea\u6709\u5f53\u4f60\u78b0\u5230\u4ec0\u4e48\u95ee\u9898\u7684\u65f6\u5019\u7f51\u4e0a\u641c\u4e00\u5708\u624d\u80fd\u77e5\u9053\u3002\u66f4\u86cb\u75bc\u7684\u662f\u8fd9\u91cc\u9762\u5f88\u591a\u4e1c\u897f\u4f60\u4e00\u65e6\u77e5\u9053\u4e86\u5c31\u4f1a\u60f3\u6211\u9760\u539f\u6765\u6ca1\u8fd9\u4e2a\u5230\u5e95\u662f\u600e\u4e48\u8fc7\u7684\u4e0b\u53bb\u3002\u6240\u4ee5\u8fd9\u91cc\u6211\u4f1a\u5217\u51fa\u4e00\u4e9b\u6211\u7528\u8fc7\u7684\u4e00\u4e9b\uff0c\u5927\u90e8\u5206\u53d1\u884c\u7248\u9ed8\u8ba4\u5c31\u6709\uff0c\u6216\u8005\u80fd\u7528\u5305\u88f9\u7ba1\u7406\u5de5\u5177\u8f7b\u677e\u83b7\u53d6\u7684\u4e1c\u897f\u3002<\/p>\n<p style=\"color: #2f2f2f;\">\u8fd9\u7bc7\u6587\u7ae0\u4ec5\u8ba8\u8bba Linux \u73af\u5883\u4e0b\u7684\u4e1c\u897f\uff0c\u5f88\u663e\u7136\u5bf9 MacOS \u4e5f\u9002\u7528\u3002\u5176\u5b9e\u5f88\u591a\u4e1c\u897f\u867d\u7136\u6709 Windows \u4e5f\u53ef\u4ee5\u627e\u7684\u5230\u4f46\u914d\u7f6e\u6bd4\u8f83\u9ebb\u70e6\uff0c\u8fd9\u91cc\u4e0d\u518d\u4ed4\u7ec6\u8bb2\u3002\u5f88\u591a\u4e1c\u897f\u50cf Linux \u8001\u9e1f\u770b\u8d77\u6765\u4f1a\u89c9\u5f97\u54c8\u54c8\u54c8\u5b9e\u5728\u662f\u592a\u57fa\u7840\u3002\u4f46\u662f\u50cf\u00a0<code style=\"color: #dd6751;\">cd<\/code>,\u00a0<code style=\"color: #dd6751;\">ls<\/code>,\u00a0<code style=\"color: #dd6751;\">mkdir<\/code>\u00a0\u8fd9\u4e9b\u592a\u57fa\u7840\u7684\u5199\u5728\u8fd9\u91cc\u53c8\u663e\u5f97\u592a\u4e1a\u4f59\uff0c\u6240\u4ee5\u5f88\u591a\u5341\u5206\u5e38\u7528\u7684\u547d\u4ee4\u8fd9\u8fb9\u6211\u4e5f\u8df3\u8fc7\u4e86\u3002\u50cf\u00a0<code style=\"color: #dd6751;\">git<\/code>\u00a0\u8fd9\u79cd\u91cd\u91cf\u7ea7\u7684\u5de5\u5177\uff0c\u548c\u00a0<code style=\"color: #dd6751;\">sed<\/code>,\u00a0<code style=\"color: #dd6751;\">awk<\/code>\u00a0\u8fd9\u4e9b\u80fd\u5355\u72ec\u51fa\u4e66\u7684\u4e1c\u897f\u6211\u89c9\u5f97\u6211\u4e5f\u8bb2\u4e0d\u6e05\u695a\uff0c\u6240\u4ee5\u8fd9\u8fb9\u90fd\u662f\u529f\u80fd\u7b80\u5355\u7684\u5c0f\u4e1c\u897f\u3002\u4e0d\u8fc7\u8fd9\u4e9b\u5c0f\u95ee\u9898\u5c31\u7b97\u4e86\u5427&#8230;<\/p>\n<h2 style=\"color: #2f2f2f;\">\u5982\u679c\u4f60\u65f6\u95f4\u6bd4\u8f83\u5145\u88d5<\/h2>\n<p style=\"color: #2f2f2f;\">&#8230;\u90a3\u4e48\u4e0d\u5982\u770b\u770b\u8fd9\u672c\u4e66\u5427:\u00a0<a style=\"color: #28a1c5;\" title=\"The Linux Command Line\" href=\"http:\/\/linuxcommand.org\/tlcl.php\" target=\"_blank\" rel=\"nofollow\">&lt;&lt;The Linux Command Line&gt;&gt;<\/a>\u3002\u4e66\u7684\u5185\u5bb9\u5c31\u8ddf\u6807\u9898\u4e00\u6837\uff0c\u6df1\u5165\u6d45\u51fa\u7684\u4ecb\u7ecd\u4e86\u6240\u8c13 &#8220;Linux \u547d\u4ee4\u884c&#8221; \u7684\u65b9\u65b9\u9762\u9762\uff0c\u672c\u6587\u5f88\u591a\u5185\u5bb9\u4e5f\u662f\u4ece\u4e66\u91cc\u770b\u5230\u7684\u3002\u7f51\u7ad9\u4e0a\u6709 PDF \u5408\u6cd5\u514d\u8d39\u4e0b\u8f7d\uff0c\u4e66\u5199\u7684\u5f88\u597d\u53ef\u4ee5\u5f88\u968f\u610f\u7684\u770b\u4e0d\u4f1a\u89c9\u5f97\u538b\u529b\u592a\u5927\u3002\u6700\u4e3b\u8981\u7684\uff0c\u5982\u679c\u4f60\u662f\u521a\u521a\u63a5\u89e6 Linux \u90a3\u4e48\u8fd9\u4e2a\u8bf4\u4e0d\u5b9a\u662f\u6700\u597d\u7684\u4e0a\u624b\u6559\u7a0b\uff0c\u6211\u5341\u5206\u540e\u6094\u539f\u6765\u4e0d\u77e5\u9053\u8fd9\u4e48\u4e66\u3002\u8fd9\u4e48\u8bf4\u8d77\u6765\u53e6\u5916\u4e00\u672c Linux \u5165\u95e8\u5927\u5e08\u7ea7\u6559\u7a0b\u5e94\u8be5\u662f<a style=\"color: #28a1c5;\" title=\"\u9ce5\u54e5\u7684 Linux \u79c1\u623f\u83dc\" href=\"http:\/\/linux.vbird.org\/\" target=\"_blank\" rel=\"nofollow\">\u9e1f\u54e5\u79c1\u623f\u83dc<\/a>\uff0c\u8fd9\u4e2a\u5b9e\u5728\u662f\u592a\u51fa\u540d\u4ee5\u81f3\u4e8e\u6211\u89c9\u5f97\u6ca1\u4ec0\u4e48\u53ef\u4ee5\u8bf4\u7684\u3002<\/p>\n<h2 style=\"color: #2f2f2f;\">\u5982\u679c\u4f60\u6ca1\u4ec0\u4e48\u7a7a\u7684\u8bdd<\/h2>\n<p style=\"color: #2f2f2f;\">\u90a3\u4e0b\u9762\u5c31\u4ee5\u968f\u673a\u7684\u987a\u5e8f\u5217\u51fa\u4e00\u4e9b\u6211\u89c9\u5f97\u975e\u5e38\u68d2\u7684\u547d\u4ee4\u884c\u5de5\u5177\u3002\u8fd9\u91cc\u4e0d\u8be6\u7ec6\u4ecb\u7ecd\u5404\u79cd\u53c2\u6570\uff0c\u4f60\u5e94\u8be5\u505a\u7684\u662f\u7528\u00a0<code style=\"color: #dd6751;\">man xxx<\/code>\u00a0\u6765\u67e5\u770b\u6587\u6863\u3002\u5982\u679c\u8fd9\u4e9b\u7a0b\u5e8f\u5728\u4f60\u7684\u53d1\u884c\u7248\u91cc\u6ca1\u6709\u5b89\u88c5\uff0c\u90a3\u4e48\u8bf7\u624b\u52a8\u641c\u4e00\u4e0b\u3002Mac \u7528\u6237\u7684\u8bdd\u5728\u00a0<a style=\"color: #28a1c5;\" title=\"homebrew for osx\" href=\"http:\/\/brew.sh\/\" target=\"_blank\" rel=\"nofollow\">homebrew<\/a>\u00a0\u91cc\u53ef\u4ee5\u5e94\u8be5\u90fd\u80fd\u627e\u5230\u3002<\/p>\n<h3 style=\"color: #2f2f2f;\"><span style=\"color: rgb(255, 0, 0);\">tmux<\/span><\/h3>\n<p style=\"color: #2f2f2f;\">\u867d\u7136\u8bf4\u987a\u5e8f\u5f88\u968f\u673a\u4f46\u8fd9\u4e00\u6761\u4e00\u5b9a\u5f97\u6392\u5728\u7b2c\u4e00\u4e2a\u3002\u5f88\u591a\u4eba\u7528 Linux \u7684\u72b6\u6001\u90fd\u662f\u81ea\u5df1\u7684\u673a\u5668\u662f Windows\uff0c\u7528\u00a0<code style=\"color: #dd6751;\">putty<\/code>\u00a0\u8fde\u5230\u4e00\u4e2a\u54ea\u91cc\u7684 Linux \u670d\u52a1\u5668\u8fdb\u884c\u5de5\u4f5c\u3002\u8fd9\u6837\u7684\u8bdd\u6bcf\u6b21\u65ad\u5f00\u7684\u65f6\u5019\u4f60\u8fd0\u884c\u7684\u7a0b\u5e8f\u90fd\u662f\u4f1a\u88ab\u6740\u6389\u7684\u3002\u4f60\u53ef\u80fd\u4f1a\u5e0c\u671b\u9000\u51fa\u7684\u65f6\u5019\u80fd\u628a\u6253\u5f00\u7684\u7a0b\u5e8f\u4fdd\u6301\u5728\u90a3\u91cc\uff0c\u4e0b\u6b21\u7528\u8fde\u63a5\u7684\u65f6\u5019\u53c8\u80fd\u81ea\u52a8\u5230\u4e4b\u524d\u7684\u5de5\u4f5c\u72b6\u6001\u3002<code style=\"color: #dd6751;\">tmux<\/code>\u00a0\u5c31\u662f\u8fd9\u4e2a\u95ee\u9898\u7684\u7ec8\u6781\u89e3\u51b3\u65b9\u6848\u3002\u5b83\u4eec\u4e00\u65b9\u9762\u7684\u529f\u80fd\u662f\u80fd\u5728\u4e00\u4e2a Terminal \u91cc\u521b\u5efa\u591a\u4e2a\u201c\u7a97\u53e3\u201d\uff0c\u53e6\u4e00\u65b9\u9762\u5982\u679c\u4f60\u5173\u95ed\u8fde\u63a5\u6216\u8005\u610f\u5916\u6389\u7ebf\uff0c\u5b83\u4eec\u9ed8\u8ba4\u4e5f\u4e0d\u4f1a\u5173\u6389\uff0c\u4e0b\u6b21\u8fde\u4e0a\u53bb\u53ef\u4ee5\u7528<code style=\"color: #dd6751;\">tmux attach<\/code>\u00a0\u6765\u6062\u590d\u4f60\u4e4b\u524d\u7684\u5de5\u4f5c\u72b6\u6001\u3002<\/p>\n<p style=\"color: #2f2f2f;\">\u5982\u679c\u4f60\u6ca1\u542c\u8bf4\u8fc7\u8fd9\u4e2a\u6216\u8005\u7c7b\u4f3c\u7684\u00a0<code style=\"color: #dd6751;\">screen<\/code>\u00a0\u7684\u8bdd\uff0c\u90a3\u4f60\u5e94\u8be5\u7ed9\u6211\u4e00\u70b9\u73b0\u91d1\u3002<\/p>\n<h3 style=\"color: #2f2f2f;\">tree<\/h3>\n<p style=\"color: #2f2f2f;\"><code style=\"color: #dd6751;\">ls<\/code>\u00a0\u53ef\u80fd\u662f\u4f60\u6700\u5e38\u7528\u7684\u547d\u4ee4\u4e4b\u4e00\u3002<code style=\"color: #dd6751;\">tree<\/code>\u00a0\u53ef\u4ee5\u9012\u5f52\u7684\u5217\u51fa\u76ee\u5f55\u4e0b\u6240\u6709\u7684\u6587\u4ef6\uff0c\u5e76\u4ee5\u6811\u72b6\u5f62\u5f0f\u5c55\u73b0\uff1a<\/p>\n<pre style=\"color: #333333;\"><code style=\"color: #dd6751;\">$ tree\n.\n\u251c\u2500\u2500 b\n\u251c\u2500\u2500 c\n\u2502   \u2514\u2500\u2500 d\n\u2514\u2500\u2500 what<\/code><\/pre>\n<p style=\"color: #2f2f2f;\">\u5bf9\u5e94\u7684\u4e5f\u6709\u00a0<code style=\"color: #dd6751;\">pstree<\/code>\u00a0\u53ef\u4ee5\u4ee5\u8fd9\u6837\u7684\u65b9\u5f0f\u6765\u663e\u793a\u8fdb\u7a0b\u6811\u3002<\/p>\n<h3 style=\"color: #2f2f2f;\">ack<\/h3>\n<p style=\"color: #2f2f2f;\">\u6211\u8bb0\u5f97\u6211\u66fe\u7ecf\u5728\u9762\u8bd5\u7684\u65f6\u5019\u88ab\u95ee\u5230\u8fc7\u201c\u8bf7\u5199\u5982\u4f55\u8c03\u7528\u00a0<code style=\"color: #dd6751;\">grep<\/code>\u00a0\u6765\u5217\u51fa\u5f53\u524d\u76ee\u5f55\u4e0b\u6240\u6709\u6587\u4ef6\u91cc\uff0c\u542b\u6709\u67d0\u4e2a\u5b57\u7b26\u4e32\u7684\u884c\u201d\u3002\u8fd9\u4e2a\u95ee\u9898\u6211\u7684\u56de\u7b54\u662f \u201c\u7528\u00a0<code style=\"color: #dd6751;\">ack<\/code>\u00a0\u5c31\u53ef\u4ee5\u4e86\u201d\u3002<code style=\"color: #dd6751;\">ack<\/code>\u00a0\u7684\u5b98\u7f51\u57df\u540d\u5c31\u53eb\u00a0<a style=\"color: #28a1c5;\" title=\"Beyond grep\" href=\"http:\/\/betterthangrep.com\/\" target=\"_blank\" rel=\"nofollow\"><em>betterthangrep.com<\/em><\/a>\u3002\u7531\u4e8e\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u8f7d\u6240\u6709\u6587\u4ef6\u91cc\u67e5\u627e\u67d0\u4e2a\u5b57\u4e32\u7b26\u662f\u5982\u6b64\u5e38\u89c1\u7684\u4e00\u4e2a\u64cd\u4f5c\uff0c\u6267\u884c\u00a0<code style=\"color: #dd6751;\">ack foo<\/code>\u00a0\u5c31\u53ef\u4ee5\u5728\u5f53\u524d\u76ee\u5f55\u6240\u6709\u6587\u4ef6\u91cc\u67e5\u627e<code style=\"color: #dd6751;\">foo<\/code>\u3002<code style=\"color: #dd6751;\">ack<\/code>\u00a0\u9ed8\u8ba4\u4f1a\u8df3\u8fc7\u5f88\u591a\u6ca1\u7528\u7684\u76ee\u5f55\u548c\u6587\u4ef6\uff0c\u8ba9\u67e5\u627e\u66f4\u5feb\uff0c\u8f93\u51fa\u7ed3\u679c\u66f4\u51c6\u786e\u3002\u53e6\u5916\u50cf\u9ed8\u8ba4\u5f00\u542f\u7684\u5f69\u8272\u663e\u793a\u4e5f\u8ba9\u4eba\u7528\u8d77\u6765\u5f88\u8212\u7545\u3002<\/p>\n<p style=\"color: #2f2f2f;\"><code style=\"color: #dd6751;\">ack<\/code>\u00a0\u76ee\u524d\u5927\u90e8\u5206\u53d1\u884c\u7248\u4e2d\u6ca1\u6709\uff0c\u5982\u679c\u4f60\u4f7f\u7528\u7684\u662f Ubuntu \u7684\u8bdd\u5176\u5305\u88f9\u540d\u5b57\u662f<code style=\"color: #dd6751;\">ack-grep<\/code>\uff0c\u6267\u884c\u6587\u4ef6\u7684\u540d\u5b57\u4e5f\u4e00\u6837\u3002\u5177\u4f53\u53ef\u4ee5\u5728<a style=\"color: #28a1c5;\" title=\"Install ack\" href=\"http:\/\/beyondgrep.com\/install\/\" target=\"_blank\" rel=\"nofollow\">\u8fd9\u91cc<\/a>\u67e5\u770b\u6587\u6863\u3002<\/p>\n<h3 style=\"color: #2f2f2f;\"><span style=\"color: rgb(255, 0, 0);\">rsync<\/span><\/h3>\n<p style=\"color: #2f2f2f;\">\u6bd4\u5982\u8bf4\u4f60\u672c\u5730\u6709\u4e00\u53f0\u7535\u8111\uff0c\u8fdc\u7a0b\u6709\u4e00\u53f0\u670d\u52a1\u5668\u3002\u4f60\u60f3\u628a\u4f60\u7684\u4e00\u4e2a\u6587\u4ef6\u5939\u5168\u90e8\u62f7\u8d1d\u5230\u53e6\u5916\u4e00\u8fb9\u7684\u67d0\u4e2a\u5730\u65b9\u53bb\u3002\u4f60\u8fd9\u4e2a\u6587\u4ef6\u5939\u7ecf\u5e38\u4e5f\u8981\u66f4\u65b0\uff0c\u5e0c\u671b\u901a\u8fc7\u67d0\u79cd\u65b9\u5f0f\u628a\u66f4\u65b0\u7684\u90e8\u5206\u80fd\u8fc5\u901f\u540c\u6b65\u8fc7\u53bb\u3002\u8fd9\u5e94\u8be5\u600e\u4e48\u505a\uff1f\u4e0d\u77e5\u9053\u00a0<code style=\"color: #dd6751;\">rsync<\/code>\u00a0\u7684\u8bdd\u4f60\u53ef\u80fd\u4f1a\u60f3\u7528\u00a0<code style=\"color: #dd6751;\">git<\/code>\uff0c\u642d\u5efa\u4e00\u4e2a\u00a0<code style=\"color: #dd6751;\">ftp<\/code>\uff0c\u6216\u8005\u7528\u00a0<code style=\"color: #dd6751;\">scp<\/code>\u00a0\u6216\u8005\u522b\u7684\u3002\u4f46\u4e8b\u5b9e\u4e0a\u00a0<code style=\"color: #dd6751;\">rsync<\/code>\u00a0\u624d\u662f\u771f\u6b63\u7684\u4e3a\u7cbe\u786e\u7684\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u800c\u751f\u7684\u8f6f\u4ef6\u3002<code style=\"color: #dd6751;\">rsync<\/code>\u00a0\u6700\u68d2\u7684\u5730\u65b9\u5c31\u662f\u5dee\u91cf\u66f4\u65b0\uff0c\u4e5f\u5c31\u662f\u53ea\u628a\u53e6\u5916\u4e00\u8fb9\u7f3a\u5c11\u7684\u4e1c\u897f\u4f20\u8fc7\u53bb\uff0c\u800c\u4e14\u4f60<em>\u4e0d\u9700\u8981\u4efb\u4f55\u989d\u5916\u914d\u7f6e<\/em>\uff0c\u901f\u5ea6\u5feb\u7684\u98de\u8d77\u3002\u4e00\u4e2a\u4f8b\u5b50\uff1a<\/p>\n<pre style=\"color: #333333;\"><code style=\"color: #dd6751;\">rsync -arvuzp --chmod=g+rx .\/built\/ me@example.com:\/var\/www\/site<\/code><\/pre>\n<h3 style=\"color: #2f2f2f;\">aspell<\/h3>\n<p style=\"color: #2f2f2f;\">\u4f5c\u4e3a\u4e00\u4e2a\u7a0b\u5e8f\u5458\u4f60\u603b\u6709\u4e00\u5929\u4f1a\u8981\u5199\u82f1\u6587\u6587\u6863\u3002\u6211\u7b49\u6bcd\u8bed\u4e0d\u662f\u82f1\u6587\u7684\u51fa\u73b0\u62fc\u5199\u9519\u8bef\u5b9e\u5728\u662f\u592a\u6b63\u5e38\u4e86\u3002\u5982\u679c\u4f60\u7528 Word \u7684\u8bdd\u4f1a\u6709\u4e0b\u5212\u7ebf\u63d0\u793a\u4f60\uff0c\u4f46\u5982\u679c\u4f60\u662f\u5728\u4ee3\u7801\u91cc\u5199\u6ce8\u91ca\u6216\u8005\u518d Linux \u4e0b\u5199 markdown \u7684\u8bdd\u597d\u50cf\u5c31\u6ca1\u4ec0\u4e48\u529e\u6cd5\u3002\u4e8b\u5b9e\u4e0a\u8fd9\u4e5f\u662f\u4e00\u4e2a\u5df2\u7ecf\u88ab\u89e3\u51b3\u7684\u95ee\u9898\uff0c<code style=\"color: #dd6751;\">aspell<\/code>\u00a0\u6b63\u662f\u6765\u505a\u8fd9\u4e2a\u7684\u3002<code style=\"color: #dd6751;\">aspell<\/code>\u00a0\u53ef\u4ee5\u5bf9\u4efb\u4f55\u7eaf\u6587\u672c\u8fdb\u884c\u62fc\u5199\u68c0\u67e5\uff0c\u4f5c\u4e3a\u9762\u5411\u7a0b\u5e8f\u5458\u7684\u5de5\u5177\u5b83\u53ef\u4ee5\u4fa6\u6d4b\u6587\u4ef6\u7c7b\u578b\uff0c\u6bd4\u5982\u5bf9 C++ \u7a0b\u5e8f\u5b83\u5c31\u53ea\u68c0\u67e5\u6ce8\u91ca\u91cc\u7684\u5355\u8bcd\u3002<\/p>\n<h3 style=\"color: #2f2f2f;\">tee<\/h3>\n<p style=\"color: #2f2f2f;\">\u6709\u65f6\u5019\u67d0\u4e9b\u547d\u4ee4\u8fd0\u884c\u7684\u7ed3\u679c\u4f1a\u5f88\u957f\uff0c\u4f60\u53ef\u80fd\u4f1a\u7528\u00a0<code style=\"color: #dd6751;\">less<\/code>\u00a0\u6765\u4e0a\u4e0b\u770b\u3002\u518d\u6216\u8005\u4f60\u53ef\u80fd\u4f1a\u7528\u00a0<code style=\"color: #dd6751;\">&gt;<\/code>\u00a0\u6765\u91cd\u5b9a\u5411\u5230\u6587\u4ef6\u91cc\u3002\u4f46\u67d0\u4e9b\u65f6\u5019\u7a0b\u5e8f\u6709\u53ef\u80fd\u9700\u8981\u4f60\u8f93\u5165\u00a0<code style=\"color: #dd6751;\">y<\/code>\u00a0\u6765\u786e\u8ba4\uff0c\u6216\u8005\u67d0\u4e9b\u7a0b\u5e8f\u8fd0\u884c\u7684\u65f6\u95f4\u5f88\u957f\uff0c\u4ec5\u4ec5\u91cd\u5b9a\u5411\u7684\u8bdd\u53c8\u4e0d\u592a\u786e\u5b9a\u662f\u4e0d\u662f\u5b83\u5728\u6b63\u5e38\u8fd0\u884c\u3002<code style=\"color: #dd6751;\">tee<\/code>\u00a0\u5c31\u80fd\u505a\u5230\u53c8\u8f93\u51fa\u5230\u5c4f\u5e55\u4e0a\uff0c\u53c8\u540c\u65f6\u91cd\u5b9a\u5411\u5230\u6587\u4ef6\u3002\u4e00\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\uff1a<\/p>\n<pre style=\"color: #333333;\"><code style=\"color: #dd6751;\">$ echo waht | tee out.txt<\/code><\/pre>\n<p style=\"color: #2f2f2f;\"><code style=\"color: #dd6751;\">waht<\/code>\u00a0\u4f1a\u88ab\u8f93\u51fa\u5230\u5c4f\u5e55\u4e0a\uff0c\u540c\u65f6\u4e5f\u4f1a\u88ab\u5199\u5230\u00a0<code style=\"color: #dd6751;\">out.txt<\/code>\u00a0\u6587\u4ef6\u91cc\u3002\u53e6\u5916\u00a0<code style=\"color: #dd6751;\">tee<\/code>\u00a0\u7684\u610f\u601d\u5176\u5b9e\u662f\u00a0<code style=\"color: #dd6751;\">T<\/code>\uff0c\u628a\u8f93\u5165\u8f93\u51fa\u4e2d\u95f4\u62c9\u4e86\u53c8\u591a\u626f\u51fa\u4e86\u4e00\u6761\uff0c\u53ef\u8c13\u662f\u76f8\u5f53\u5f62\u8c61\u3002<\/p>\n<p style=\"color: #2f2f2f;\">\u503c\u5f97\u4e00\u63d0\u7684\u662f\u00a0<code style=\"color: #dd6751;\">vim<\/code>\u00a0\u4e5f\u53ef\u4ee5\u7528\u5728 pipe \u91cc\uff0c\u4f8b\u5b50\u5982\u4e0b\uff1a<\/p>\n<pre style=\"color: #333333;\"><code style=\"color: #dd6751;\">$ echo waht | vim -<\/code><\/pre>\n<h3 style=\"color: #2f2f2f;\">&lt;ctrl+r&gt;<\/h3>\n<p style=\"color: #2f2f2f;\">\u4f60\u80af\u5b9a\u77e5\u9053\u7528\u952e\u76d8\u4e0a\u4e0b\u65b9\u5411\u952e\u53ef\u4ee5\u6765\u56de\u627e\u4f60\u7684\u5386\u53f2\uff0c\u90a3\u4e48\u6bd4\u5982\u6709\u4e00\u4e2a\u5f88\u4e45\u4e4b\u524d\u6253\u8fc7\u7684\u547d\u4ee4\u4f60\u53ef\u80fd\u9700\u8981\u731b\u6309\u4e0a\u624d\u80fd\u627e\u5230\u3002\u5176\u5b9e\u8fd9\u65f6\u5019\u53ea\u8981\u8f93\u5165\u4e00\u90e8\u5206\u7136\u540e\u6309 &lt;ctrl+r&gt;<code style=\"color: #dd6751;\">bash<\/code>\u00a0\u5c31\u4f1a\u5e2e\u4f60\u5f80\u56de\u641c\u7d22\u3002\u8fde\u7eed\u6309 &lt;ctrl+r&gt; \u53ef\u4ee5\u6309\u987a\u5e8f\u5f80\u524d\u641c\u3002(\u6216\u8005\u76f4\u63a5\u6309 &lt;ctrl+r&gt; \u518d\u8fdb\u884c\u8f93\u5165)\u3002\u63a5\u7740\u4e0a\u9762\u4e00\u4e2a\u7684\u4f8b\u5b50\uff0c\u8f93\u5165\u00a0<code style=\"color: #dd6751;\">echo<\/code>\u00a0\u540e\u6309 &lt;ctrl+r&gt; \u6548\u679c\u5982\u4e0b\uff1a<\/p>\n<pre style=\"color: #333333;\"><code style=\"color: #dd6751;\">(reverse-i-search)`echo': echo waht | vim -<\/code><\/pre>\n<p style=\"color: #2f2f2f;\">\u6709\u5f80\u524d\u641c\u7d22\u90a3\u4e48\u4e00\u822c\u5c31\u6709\u5f80\u540e\u641c\u7d22\u3002\u53ef\u60dc\u7684\u662f\u5f80\u540e\u641c\u7d22\u7684\u5feb\u6377\u952e\u662f &lt;ctrl+s&gt;\uff0c\u5982\u679c\u4f60\u8bd5\u7740\u6309\u4e00\u4e0b\u7684\u5c31\u4f1a\u53d1\u73b0&#8230;\u597d\u50cf\u673a\u5668\u6ca1\u53cd\u5e94\u4e86\u3002\u8fd9\u4e2a\u662f\u56e0\u4e3a &lt;ctrl+s&gt; \u5927\u90e8\u5206\u60c5\u51b5\u4e0b\u9ed8\u8ba4\u662f\u00a0<a style=\"color: #28a1c5;\" title=\"Software flow control\" href=\"http:\/\/en.wikipedia.org\/wiki\/Software_flow_control\" target=\"_blank\" rel=\"nofollow\">XOFF<\/a>\uff0c\u4ee3\u8868\u6682\u505c\u63a5\u6536\u8f93\u5165\u3002\u6309 &lt;ctrl+q&gt; \u5c31\u80fd\u6062\u590d\u3002\u5f53\u7136\u4f60\u53ef\u4ee5\u628a\u5411\u524d\u641c\u7d22\u7ed1\u5b9a\u5230\u522b\u7684\u952e\u4e0a\uff0c\u8bf7\u81ea\u884c\u641c\u7d22\u3002<\/p>\n<h3 style=\"color: #2f2f2f;\"><span style=\"color: rgb(255, 0, 0);\">cloc<\/span><\/h3>\n<p style=\"color: #2f2f2f;\">\u867d\u8bf4\u4ee3\u7801\u884c\u6570\u4e0d\u80fd\u8bf4\u660e\u4efb\u4f55\u95ee\u9898\uff0c\u4f46\u6709\u65f6\u5019\u4e0d\u77e5\u4e3a\u4ec0\u5c31\u662f\u60f3\u77e5\u9053\u3002<code style=\"color: #dd6751;\">cloc<\/code>\u00a0\u80fd\u7cbe\u786e\u7684\u8ba1\u7b97\u4ee3\u7801\u884c\u6570\uff0c\u628a\u6ce8\u91ca\u548c\u7a7a\u683c\u90fd\u533a\u5206\u5f00\u3002\u5982\u679c\u4f60\u662f\u4e00\u540d\u4f20\u8bf4\u4e2d\u7684\u9879\u76ee\u7ecf\u7406\u7684\u8bdd\uff0c\u4ece\u4eca\u5929\u8d77\u5f00\u59cb\u7528\u00a0<code style=\"color: #dd6751;\">cloc<\/code>\u00a0\u7ed9\u4f60\u624b\u4e0b\u7684\u7801\u519c\u7b97\u5de5\u8d44\u5427\uff01\u4e0b\u9644\u622a\u5c4f\uff1a<\/p>\n<pre style=\"color: #333333;\"><code style=\"color: #dd6751;\">$ cloc \/usr\/include\/\n    9628 text files.\n    9308 unique files.\n     434 files ignored.\n\nT=39.0 s (227.6 files\/s, 39948.2 lines\/s)\n-------------------------------------------------\nLanguage        files    blank  comment      code\n-------------------------------------------------\nC\/C++ Header     8875   217366   287013   1053368\nTeamcenter def      1       48        0       186\n-------------------------------------------------\nSUM:             8876   217414   287013   1053554\n-------------------------------------------------<\/code><\/pre>\n<h3 style=\"color: #2f2f2f;\">printenv<\/h3>\n<p style=\"color: #2f2f2f;\">\u7528\u00a0<code style=\"color: #dd6751;\">set<\/code>\u00a0\u53ef\u4ee5\u67e5\u770b\u6240\u6709\u7684 Shell \u53d8\u91cf\u8fd8\u5305\u62ec Shell \u51fd\u6570\uff0c\u4f46\u662f\u5176\u4e2d\u6709\u4e00\u4e9b\u662f\u4ec5\u4ec5\u5728\u5f53\u524d shell \u91cc\u5176\u4f5c\u7528\u7684\u3002\u800c\u5f80\u5f80\u4f60\u9700\u8981\u627e\u7684\u662f\u901a\u8fc7\u00a0<code style=\"color: #dd6751;\">export<\/code>\u00a0\u6765\u5b9a\u4e49\u7684\u73af\u5883\u53d8\u91cf\u3002<code style=\"color: #dd6751;\">printenv<\/code>\u00a0\u5c31\u662f\u7528\u6765\u505a\u8fd9\u4e2a\u7684\u3002<\/p>\n<h3 style=\"color: #2f2f2f;\">set -o vi<\/h3>\n<p style=\"color: #2f2f2f;\"><code style=\"color: #dd6751;\">bash<\/code>\u00a0\u6216\u8005\u53ef\u80fd\u7edd\u5927\u591a\u6570\u5e38\u89c1 shell \u5176\u5b9e\u90fd\u662f\u652f\u6301\u7528\u00a0<code style=\"color: #dd6751;\">vi<\/code>\u00a0\u7684\u65b9\u5f0f\u8fdb\u884c\u547d\u4ee4\u884c\u7f16\u8f91\u7684\uff0c\u6bd4\u5982\u8bbe\u7f6e\u4e86\u00a0<code style=\"color: #dd6751;\">set -o vi<\/code>\u00a0\u540e\u4f60\u5c31\u53ef\u4ee5\u7528\u719f\u6089\u7684\u00a0<code style=\"color: #dd6751;\">hjkl<\/code>\u00a0\u6765\u79fb\u52a8\uff0c\u7528\u00a0<code style=\"color: #dd6751;\">w<\/code>,\u00a0<code style=\"color: #dd6751;\">b<\/code>\u00a0\u6765\u8df3\u8fc7\u5355\u8bcd\u7b49\u7b49\u3002<\/p>\n<p style=\"color: #2f2f2f;\">\u540c\u6837\u7684\u5982\u679c\u4f60\u8bbe\u7f6e\u4e86\u00a0<code style=\"color: #dd6751;\">EDITOR<\/code>\u00a0\u73af\u5883\u53d8\u91cf\u7684\u8bdd\uff0c\u8f93\u5165\u00a0<code style=\"color: #dd6751;\">fc<\/code>\u00a0\u5c31\u53ef\u4ee5\u628a\u4e4b\u524d\u8f93\u5165\u7684\u547d\u4ee4\u884c\u653e\u5230\u7f16\u8f91\u5668\u91cc\u6765\u7f16\u8f91\uff0c\u53ea\u8981\u4fdd\u5b58\u4e86\u7684\u8bdd\u5c31\u4f1a\u6267\u884c\u3002\u76f8\u53cd\u7684\u653e\u5f03\u4fdd\u5b58\u5c31\u7b49\u4e8e\u662f\u653e\u5f03\u3002<\/p>\n<h3 style=\"color: #2f2f2f;\">find<\/h3>\n<p style=\"color: #2f2f2f;\">\u6211\u628a\u4e0a\u9762\u8bf4\u5230\u7684<a style=\"color: #28a1c5;\" title=\"The Linux Command Line\" href=\"http:\/\/linuxcommand.org\/tlcl.php\" target=\"_blank\" rel=\"nofollow\">\u90a3\u672c\u4e66<\/a>\u4ed4\u7ec6\u770b\u8fc7\u4ee5\u540e\uff0c\u6700\u5927\u7684\u6536\u83b7\u4e4b\u4e00\u5c31\u662f\u7ec8\u4e8e\u5b66\u4f1a\u4e86\u7528\u00a0<code style=\"color: #dd6751;\">find<\/code>\u3002\u8fd9\u4e2a\u73b0\u5728\u53d8\u6210\u4e86\u6211\u51e0\u4e4e\u6bcf\u5929\u90fd\u5728\u7528\u7684\u4e00\u4e2a\u547d\u4ee4\u3002\u6bd4\u5982\u8bf4\u6211\u8981\u628a\u76ee\u5f55\u4e0b\u6240\u6709\u7684\u00a0<code style=\"color: #dd6751;\">png<\/code>\u00a0\u6587\u4ef6\u52a0\u5165\u5230\u8fd9\u6b21\u7684 git commit \u91cc\u9762\uff0c\u6211\u53ef\u4ee5\u7528:<\/p>\n<pre style=\"color: #333333;\"><code style=\"color: #dd6751;\">find . -name '*.png' -exec git add {} ';'<\/code><\/pre>\n<p style=\"color: #2f2f2f;\">\u5982\u679c\u4f60\u719f\u6089\u00a0<code style=\"color: #dd6751;\">find<\/code>\u00a0\u7684\u8bdd\u4f60\u4f1a\u77e5\u9053\u6700\u540e\u7684\u00a0<code style=\"color: #dd6751;\">;<\/code>\u00a0\u53ef\u4ee5\u6362\u4e3a\u00a0<code style=\"color: #dd6751;\">+<\/code>\u00a0\u4f1a\u66f4\u597d\uff0c\u4f46\u7528\u5b83\u5c31\u662f\u6709\u76ee\u7684\u7684\u3002\u8fd9\u4e2a\u547d\u4ee4\u867d\u7136\u770b\u8d77\u6765\u5f88\u7b80\u5355\uff0c\u4f46\u91cc\u9762\u7684\u5355\u5f15\u53f7\u7701\u7565\u6216\u8005\u6362\u6210\u53cc\u5f15\u53f7\u547d\u4ee4\u90fd\u662f\u4f1a\u5931\u8d25\u7684\u3002\u8fd9\u4e9b\u7275\u6d89\u5230 &#8220;shell variable expansion&#8221; \u548c\u5f15\u53f7\u7684 escape \u89c4\u5219\uff0c\u867d\u7136\u611f\u89c9\u5f88\u607c\u706b\u4f46\u5176\u5b9e\u8fd9\u4e9b\u53ea\u6709\u51e0\u4e2a\u7b80\u5355\u7684\u89c4\u5219\uff0c\u800c\u4e14\u4e00\u81f4\u6027\u975e\u5e38\u597d\u3002\u6240\u4ee5\u53ea\u8981\u4f60\u80af\u82b1\u70b9\u65f6\u95f4\u628a\u76f8\u5173\u4e1c\u897f\u5f04\u6e05\u695a\uff0c\u8fd9\u79cd\u7b80\u5355\u7684\u95ee\u9898\u5c31\u53ef\u4ee5\u8f7b\u677e\u641e\u5b9a\u3002<\/p>\n<h3 style=\"color: #2f2f2f;\">type<\/h3>\n<p style=\"color: #2f2f2f;\">\u5982\u679c\u00a0<code style=\"color: #dd6751;\">foo<\/code>\u00a0\u662f\u4e00\u4e2a\u547d\u4ee4\u884c\u91cc\u53ef\u4ee5\u76f4\u63a5\u8fd0\u884c\u7684\u7a0b\u5e8f\u7684\u8bdd\uff0c\u4f60\u5e94\u8be5\u77e5\u9053\u7528\u00a0<code style=\"color: #dd6751;\">which foo<\/code>\u00a0\u53ef\u4ee5\u627e\u5230\u00a0<code style=\"color: #dd6751;\">foo<\/code>\u00a0\u7684\u53ef\u6267\u884c\u6587\u4ef6\u8def\u5f84\u5728\u90a3\u91cc\u3002\u4f46\u5728\u547d\u4ee4\u884c\u91cc\u53ef\u4ee5\u6267\u884c\u7684\u547d\u4ee4\u5e76\u4e0d\u4e00\u5b9a\u90fd\u5bf9\u5e94\u5230\u67d0\u4e2a\u53ef\u6267\u884c\u7684\u6587\u4ef6\uff0c\u5b83\u53ef\u4ee5\u662f alias, shell \u81ea\u5e26\u7684\u51fd\u6570\u548c\u7528\u6237\u81ea\u5df1\u7684\u51fd\u6570\u7b49\u7b49\u3002\u6240\u4ee5\u6709\u65f6\u5019\u7528\u00a0<code style=\"color: #dd6751;\">which<\/code>\u00a0\u627e\u5230\u4e0d\u5230\u4e1c\u897f\u7684\u65f6\u5019\u4f1a\u8ba9\u4eba\u5f88\u7591\u60d1\u3002\u5176\u5b9e\u4f60\u53ef\u4ee5\u7528\u00a0<code style=\"color: #dd6751;\">type foo<\/code>\u00a0\u770b\u770b\u00a0<code style=\"color: #dd6751;\">foo<\/code>\u00a0\u5230\u5e95\u662f\u4ec0\u4e48\u7c7b\u578b\u7684\u3002<\/p>\n<h3 style=\"color: #2f2f2f;\">help<\/h3>\n<p style=\"color: #2f2f2f;\">\u4e0a\u9762\u63d0\u5230\u4e86 &#8220;builtin command&#8221; \u4e5f\u5c31\u662f\u5185\u7f6e\u547d\u4ee4\uff0c\u5c31\u662f\u7531 shell \u63d0\u4f9b\u7684\u4e00\u4e9b\u57fa\u672c\u7684\u6216\u8005\u65e0\u6cd5\u7531\u5916\u90e8\u7a0b\u5e8f\u505a\u5230\u7684\u547d\u4ee4\u3002\u5e73\u5e38\u4f60\u53ef\u4ee5\u7528\u00a0<code style=\"color: #dd6751;\">man<\/code>\u00a0\u6765\u67e5\u770b\u6587\u6863\uff0c\u4f46\u662f\u5bf9\u4e8e\u5185\u7f6e\u547d\u4ee4\u00a0<code style=\"color: #dd6751;\">man<\/code>\u00a0\u4f1a\u8df3\u5230 shell \u81ea\u5df1\u7684 manpage\uff0c\u5728\u67d0\u4e9b\u7cfb\u7edf\u91cc\u90a3\u5c31\u662f\u5de8\u5927\u7684\u4e00\u9875\u4f60\u8981\u518d\u91cc\u9762\u627e\u5230\u4f60\u60f3\u770b\u7684\u4e1c\u897f\uff0c\u6709\u4e9b\u7cfb\u7edf\u91cc\u5e72\u8106\u5c31\u6ca1\u6709\u76f8\u5173\u7684\u4fe1\u606f\u3002\u8fd9\u79cd\u65f6\u5019\u7528\u00a0<code style=\"color: #dd6751;\">help<\/code>\u00a0\u8fd9\u4e2a\u5185\u7f6e\u547d\u4ee4\u5c31\u53ef\u4ee5\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff1a\u6bd4\u5982\u8981\u67e5\u770b\u00a0<code style=\"color: #dd6751;\">set<\/code>\u00a0\u7684\u63a5\u53d7\u7684\u9009\u9879\uff0c\u53ef\u4ee5\u7528\u00a0<code style=\"color: #dd6751;\">help set<\/code>\u6765\u8f7b\u677e\u627e\u5230\u3002<\/p>\n<h3 style=\"color: #2f2f2f;\">env<\/h3>\n<p style=\"color: #2f2f2f;\">\u4f60\u5e94\u8be5\u77e5\u9053\u5728\u00a0<code style=\"color: #dd6751;\">#!<\/code>\u00a0(shebang) \u5728\u811a\u672c\u7b2c\u4e00\u884c\u7684\u4f5c\u7528\u662f\u6307\u5b9a\u5176 &#8216;runtime&#8217;\u3002\u6bd4\u5982\u8bf4\u4f60\u60f3\u8981\u5199\u4e00\u4e2a Python \u7684\u811a\u672c\uff0c\u4f46\u5176\u5b9e\u4e0d\u592a\u5728\u610f\u5176\u7248\u672c\uff0c\u6216\u8005\u4e0d\u786e\u5b9a\u5176\u53ef\u6267\u884c\u6587\u4ef6\u5728\u4e0d\u540c\u7684\u673a\u5668\u4e0a\u5230\u5e95\u5728\u54ea\u91cc\u3002\u90a3\u4e48\u00a0<code style=\"color: #dd6751;\">env<\/code>\u00a0\u5728\u8fd9\u91cc\u5c31\u53ef\u4ee5\u6d3e\u4e0a\u7528\u573a\u4e86\u3002\u53ef\u4ee5\u5199\u6210<code style=\"color: #dd6751;\">#!\/usr\/bin\/env python<\/code>\uff0c\u8fd9\u6837\u6267\u884c\u7684\u65f6\u5019\u5c31\u4f1a\u7528\u5f53\u524d\u00a0<code style=\"color: #dd6751;\">PATH<\/code>\u00a0\u4e2d\u627e\u5230\u7684\u00a0<code style=\"color: #dd6751;\">python<\/code>\u3002\u53e6\u4e00\u65b9\u9762\u8fd9\u4e2a\u4e5f\u662f\u4e00\u4e2a\u7ed9\u4f60\u4e00\u4e2a\u5728\u4e0d\u4fee\u6539\u4ee3\u7801\u7684\u60c5\u51b5\u4e0b\uff0c\u91cd\u65b0\u9009\u62e9 &#8216;runtime&#8217; \u7684\u673a\u4f1a\u3002<\/p>\n<h3 style=\"color: #2f2f2f;\">file<\/h3>\n<p style=\"color: #2f2f2f;\">\u5982\u679c\u4f60\u60f3\u77e5\u9053\u67d0\u4e2a\u8def\u5f84\u4e0a\u7684\u6587\u4ef6\u5230\u5e95\u662f\u4ec0\u4e48\u7c7b\u578b\u7684\uff0c\u90a3\u4e48\u7528\u00a0<code style=\"color: #dd6751;\">file<\/code>\u00a0\u662f\u518d\u5408\u9002\u4e0d\u8fc7\u7684\u4e86\u3002\u5b83\u80fd\u5bf9\u4efb\u4f55\u4e1c\u897f\u90fd\u7ed9\u51fa\u4e00\u4e2a\u6709\u610f\u4e49\u7684\u89e3\u91ca\uff0c\u5bf9\u4e8e\u4e8c\u8fdb\u5236\u6587\u4ef6\u8fd8\u4f1a\u5217\u51fa\u5f88\u591a\u76f8\u5173\u7684\u91cd\u8981\u4fe1\u606f\u3002<\/p>\n<h3 style=\"color: #2f2f2f;\">strings<\/h3>\n<p style=\"color: #2f2f2f;\">\u201c\u6211\u628a\u6211\u7684\u79d8\u5bc6\uff0c\u653e\u5728\u4e86\u8fd9\u4e2a\u7528 C++ \u7f16\u5199\u7684\u7a0b\u5e8f\u91cc\u9762\u3002\u8fd0\u884c\u5b83\u8f93\u5165\u6b63\u786e\u7684\u5bc6\u7801\u624d\u80fd\u770b\u5230\u201d\u3002\u5176\u5b9e\u4e07\u4e00\u9047\u5230\u8fd9\u79cd\u60c5\u51b5\u4f60\u53ea\u8981\u8dd1\u00a0<code style=\"color: #dd6751;\">strings program-written-in-cxx<\/code>\u00a0\u5341\u6709\u516b\u4e5d\u4f60\u5c31\u80fd\u770b\u5230\u4e86\u3002\u5b83\u80fd\u6bd4\u8f83\u51c6\u786e\u7684\u5217\u51fa\u4e8c\u8fdb\u5236\u6587\u4ef6\u91cc\u5305\u542b\u7684 C \u98ce\u683c\u7684\u5b57\u7b26\u4e32\u3002\u770b\u8d77\u6765\u6ca1\u4ec0\u4e48\u610f\u4e49\u4f46\u662f\u5176\u5b9e\u4f5c\u7528\u5b8c\u5168\u8981\u9760\u4f60\u53d1\u6325\uff0c\u6bd4\u5982\u8981\u77e5\u9053\u67d0\u4e2a\u7a0b\u5e8f\u662f\u54ea\u4e2a\u7248\u672c GCC \u7f16\u8bd1\u51fa\u6765\u7684\u7528\u00a0<code style=\"color: #dd6751;\">strings<\/code>\u00a0\u53ef\u80fd\u6709\u7ed3\u679c\u3002<\/p>\n<h3 style=\"color: #2f2f2f;\">od<\/h3>\n<p style=\"color: #2f2f2f;\">\u5168\u7a0b\u5e94\u8be5\u662f &#8220;object dump&#8221;\uff0c\u53ef\u4ee5\u5c06\u6587\u4ef6\u6309\u516b\u8fdb\u5236\uff0c\u5341\u516d\u8fdb\u5236\u6216\u8005\u5176\u4ed6\u65b9\u5f0f\u663e\u793a\u51fa\u6765\u3002\u6211\u89c9\u5f97\u5927\u90e8\u5206\u60c5\u51b5\u4e0b\u8fd9\u5927\u5bb6\u90fd\u5728\u7528\u00a0<code style=\"color: #dd6751;\">od -c<\/code>\uff0c\u5c06\u6587\u4ef6\u6309 ASCII \u7801 dump \u51fa\u6765\u3002\u4e00\u4e2a\u7528\u4f8b\u662f\u7528\u6765\u770b\u6587\u4ef6\u7684 line ending \u5230\u5e95\u662f\u600e\u6837\u7684\u3002\u6bd4\u5982\u6267\u884c\u00a0<code style=\"color: #dd6751;\">od -c foo.txt<\/code>\u00a0\u663e\u793a\u5982\u4e0b\u7ed3\u679c\uff1a<\/p>\n<pre style=\"color: #333333;\"><code style=\"color: #dd6751;\">$ od -c foo.txt\n0000000   h   e   l   l   o  t   w   o   r   l   d  r  n   y   e   a\n0000020   h\n0000021<\/code><\/pre>\n<p style=\"color: #2f2f2f;\">\u53ef\u4ee5\u6e05\u695a\u7684\u770b\u5230\u00a0<code style=\"color: #dd6751;\">t<\/code>\u00a0\u662f tab \u5b57\u7b26\uff0c\u00a0<code style=\"color: #dd6751;\">rn<\/code>\u00a0\u662f Windows \u98ce\u683c\u7684\u6362\u884c\u7b26\u3002<\/p>\n<p style=\"color: #2f2f2f;\"><span style=\"color: #ff0000;\"><strong>\u539f\u6587\u5730\u5740<\/strong><\/span>\uff1a<a href=\"http:\/\/www.jianshu.com\/p\/5ca890e5bdbf\" target=\"_blank\">http:\/\/www.jianshu.com\/p\/5ca890e5bdbf<\/a><\/p>\n<hr \/>\n<p style=\"color: #2f2f2f;\">\n<p style=\"color: #2f2f2f;\">\u518d\u52a0\u4e0a\u4e4b\u524dblog\u4e2d\u7684\u4e00\u4e9b\u6587\u7ae0\uff1a<a title=\"Linux\u4e0b\u7684\u4e00\u4e9b\u6587\u672c\u5904\u7406\u547d\u4ee4\u7684\u5b66\u4e60\" href=\"http:\/\/ixyzero.com\/blog\/archives\/866.html\" target=\"_blank\">Linux\u4e0b\u7684\u4e00\u4e9b\u6587\u672c\u5904\u7406\u547d\u4ee4\u7684\u5b66\u4e60<\/a>\u3001<a title=\"\u5e38\u7528\u7684Linux\u547d\u4ee4\u5b66\u4e60[ing]\" href=\"http:\/\/ixyzero.com\/blog\/archives\/331.html\" target=\"_blank\">\u5e38\u7528\u7684Linux\u547d\u4ee4\u5b66\u4e60[ing]<\/a>\uff0c\u5b66\u65e0\u6b62\u5883\u554a\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u56e0\u4e3a\u8fd1\u671f\u4e8b\u60c5\u8f83\u591a\uff0c\u4e5f\u6ca1\u4ec0\u4e48\u65f6\u95f4\u6765\u9ad8\u9891\u7387\u7684\u66f4\u65b0\u6587\u7ae0\uff08\u800c\u4e14\u81ea\u5df1\u672c\u8eab\u4e5f\u5c31\u5904\u5728\u4e00\u4e2a\u5b66\u4e60\u7684\u9636\u6bb5\/\u72b6\u6001\uff0c\u8981\u60f3\u4e00\u76f4\u63d0\u9ad8\u5c31\u5f97\u4e0d [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,12],"tags":[30],"class_list":["post-1138","post","type-post","status-publish","format-standard","hentry","category-linux","category-tools","tag-linux"],"views":3106,"_links":{"self":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/1138","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/comments?post=1138"}],"version-history":[{"count":0,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/1138\/revisions"}],"wp:attachment":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/media?parent=1138"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/categories?post=1138"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/tags?post=1138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}