{"id":239814,"date":"2022-04-20T08:55:35","date_gmt":"2022-04-20T00:55:35","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=239814"},"modified":"2022-04-11T10:56:19","modified_gmt":"2022-04-11T02:56:19","slug":"ten-command-line-tools","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/ten-command-line-tools.html","title":{"rendered":"\u5341\u6b3e\u547d\u4ee4\u884c\u5de5\u5177"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u5728\u5e73\u5e38\u7684\u5de5\u4f5c\u4e2d\uff0c\u6211\u4f1a\u7ecf\u5e38\u4f7f\u7528\u5230\u5f88\u591a\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u63a5\u4e0b\u6765\u6211\u4f1a\u5206\u4eab\u6211\u6700\u5e38\u4f7f\u7528\uff0c\u6700\u559c\u6b22\u7684\u5341\u4e2a\u547d\u4ee4\u884c\u5de5\u5177\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\u5de5\u6b32\u5584\u5176\u4e8b\u5fc5\u5148\u5229\u5176\u5668\uff0c\u5bf9\u4e8e\u4e00\u4e2a\u7ecf\u5e38\u5728\u7ec8\u7aef\u4e0b\u5de5\u4f5c\u7684\u6211\uff0c\u975e\u5e38\u559c\u6b22\u547d\u4ee4\u884c\u5de5\u5177\u7684\u4fbf\u6377\uff0c\u5728\u5e73\u5e38\u7684\u5de5\u4f5c\u4e2d\uff0c\u6211\u4f1a\u7ecf\u5e38\u4f7f\u7528\u5230\u5f88\u591a\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u63a5\u4e0b\u6765\u6211\u4f1a\u5206\u4eab\u6211\u6700\u5e38\u4f7f\u7528\uff0c\u6700\u559c\u6b22\u7684\u5341\u4e2a\u547d\u4ee4\u884c\u5de5\u5177\u3002<\/p>\n

fzf<\/strong><\/div>\n

\u4e00\u4e2a\u975e\u5e38\u597d\u7528\u7684\u6a21\u7cca\u67e5\u8be2\u5de5\u5177\uff0c\u4f7f\u7528\u5b83\uff0c\u4f60\u53ef\u4ee5\u975e\u5e38\u65b9\u4fbf\u5730\u627e\u5230\u81ea\u5df1\u8981\u627e\u7684\u6587\u4ef6\uff0c\u800c\u4e0d\u7528\u5728\u5404\u4e2a\u6587\u4ef6\u5939\u4e4b\u95f4\u6765\u56de\u8df3\u8f6c\u3002\u5b83\u7684\u4f7f\u7528\u65b9\u6cd5\u5f88\u7b80\u5355\uff0c\u53ea\u9700\u8981\u6a21\u7cca\u8f93\u5165\u5927\u81f4\u7684\u6587\u4ef6\u8def\u5f84\u6216\u8005\u6587\u4ef6\u540d\uff0c\u5c31\u53ef\u4ee5\u627e\u5230\uff0c\u5f53\u7136\u8f93\u5165\u7684\u8d8a\u8be6\u7ec6\uff0c\u5339\u914d\u7684\u8d8a\u7cbe\u51c6\u3002\u603b\u4e4b\uff0c\u4f7f\u7528\u5b83\u4e4b\u540e\uff0c\u6211\u673a\u4f1a\u6ca1\u5728\u4f7f\u7528\u8fc7 find \u6765\u67e5\u627e\u6587\u4ef6\u3002<\/p>\n

\"\"<\/p>\n

bat<\/strong><\/div>\n

\u4e00\u6b3ecat\u547d\u4ee4\u7684\u52a0\u5f3a\u7248\u5de5\u5177\uff0c\u5e73\u65f6\u6211\u4eec\u5728\u67e5\u770b\u65e5\u5fd7\u7684\u65f6\u5019\u7ecf\u5e38\u4f1a\u4f7f\u7528 cat \u7b49\u547d\u4ee4\u7684\u7ec4\u5408\uff0c\u4f7f\u7528\u8d77\u6765\u975e\u5e38\u65b9\u4fbf\uff0c\u4f46\u662f\u5728\u67e5\u770b\u4e00\u4e9b\u4ee3\u7801\u7684\u65f6\u5019\uff0c\u6211\u4eec\u5e0c\u671b\u53ef\u4ee5\u8fd4\u56de\u4e00\u4e9b\u8bed\u6cd5\u9ad8\u4eae\u7684\u7247\u6bb5\uff0c\u800c bat \u5c31\u662f\u8fd9\u6837\u7684\u4e00\u6b3e\u5de5\u5177\uff0c\u5728\u4fdd\u6301 cat \u539f\u6709\u7684<\/p>\n

\"\"<\/p>\n

\u529f\u80fd\u4e4b\u4e0a\uff0c\u52a0\u4e0a\u4e86\u8bed\u6cd5\u9ad8\u4eae\u7684\u529f\u80fd\uff0c\u56e0\u6b64\u81ea\u4ece\u4f7f\u7528\u5b83\u4e4b\u540e\uff0ccat \u547d\u4ee4\u5c31\u88ab\u6211\u653e\u5f03\u4e86\u3002<\/p>\n

httpie<\/strong><\/div>\n

\u4e00\u4e2a\u547d\u4ee4\u884chttp\u5ba2\u6237\u7aef\uff0c\u5b83\u4f7f\u5f97\u53d1\u9001http\u8bf7\u6c42\u53d8\u5f97\u5f02\u5e38\u7b80\u5355\u3002\u5bf9\u4e8e\u6d4b\u8bd5\u548c\u8c03\u8bd5 http \u8bf7\u6c42\u548c api \u63a5\u53e3\uff0c\u5b83\u662f\u975e\u5e38\u4eba\u6027\u5316\u7684\uff0c\u5e76\u4e14\u5b83\u7684\u8fd4\u56de\u7ed3\u679c\u662f\u7ecf\u8fc7\u683c\u5f0f\u5316\u7684\uff0c\u5e76\u4e14\u662f\u8bed\u6cd5\u9ad8\u4eae\u7684\uff0c\u975e\u5e38\u9002\u5408\u9605\u8bfb\u3002\u540c\u65f6\u5bf9\u4e8e\u4e00\u4e9b\u8868\u5355\u53c2\u6570\u53d1\u9001\uff0c\u6587\u4ef6\u4e0a\u4f20\u7b49\uff0c\u5b83\u64cd\u4f5c\u8d77\u6765\u4e5f\u662f\u975e\u5e38\u7684\u4fbf\u6377\u3002<\/p>\n

\"\"<\/p>\n

htop<\/strong><\/div>\n

\u4e00\u4e2a\u73b0\u4ee3\u7248\u7684 top \u547d\u4ee4\u3002\u76f8\u6bd4\u4e8e top\uff0c\u5b83\u7684\u8272\u5f69\u652f\u6301\u975e\u5e38\u4e30\u5bcc\uff0c\u4f60\u53ef\u4ee5\u8ba9\u4f60\u7684\u8d44\u6e90\u67e5\u770b\u663e\u5f97\u7eda\u70c2\u591a\u5f69\u3002\u540c\u65f6\u5b83\u662f\u652f\u6301\u6a2a\u5411\u548c\u7eb5\u5411\u6eda\u52a8\u7684\uff0c\u5bf9\u4e86\uff0c\u5b83\u662f\u652f\u6301\u9f20\u6807\u64cd\u4f5c\u7684\u3002\u6b64\u5916\uff0c\u5b83\u652f\u6301\u4e00\u4e9b vi \u547d\u4ee4\u7684\u64cd\u4f5c\u65b9\u5f0f\uff0c\u8fd9\u5bf9\u4e8e\u559c\u6b22 vim \u7684\u62e5\u62a4\u8005\u6765\u8bf4\u7edd\u5bf9\u662f\u8d85\u7ea7\u68d2\u7684\u529f\u80fd\u3002<\/p>\n

\"\"<\/p>\n

ctop<\/strong><\/div>\n

top \u547d\u4ee4\u4e3b\u8981\u7528\u6765\u76d1\u63a7\u7cfb\u7edf\u7684\u8f6f\u4ef6\u8d44\u6e90\u4f7f\u7528\u60c5\u51b5\uff0c\u5bf9\u4e8e docker \u5bb9\u5668\u4e2d\u5404\u4e2a\u5bb9\u5668\u4f7f\u7528\u8d44\u6e90\u60c5\u51b5\u5c31\u65e0\u80fd\u4e3a\u529b\u4e86\uff0c\u6ca1\u5173\u7cfb\uff0cctop \u53ef\u4ee5\u5b8c\u7f8e\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u5b83\u5c31\u662f\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u800c\u8bde\u751f\u7684\u3002<\/p>\n

\"\"<\/p>\n

tldr<\/strong><\/div>\n

\u6211\u4eec\u90fd\u77e5\u9053\u5f53\u4f60\u5728 linux \u9047\u5230\u95ee\u9898\u7684\u65f6\u5019\uff0c\u7b2c\u4e00\u65f6\u95f4\u5c31\u662f\u5bfb\u6c42\u5e2e\u52a9\uff0c\u800c man \u5c31\u662f\u8fd9\u6837\u7684\u4e00\u4e2a\u5de5\u5177\uff0c\u51e0\u4e4e\u6240\u6709\u7684\u547d\u4ee4\u90fd\u53ef\u4ee5\u901a\u8fc7 man \u627e\u5230\u5e2e\u52a9\u6587\u6863\uff0c\u800c tldr \u662f\u4e00\u6b3e\u7c7b\u4f3c man \u7684\u5e2e\u52a9\u624b\u518c\uff0c\u4e0e\u4e4b\u4e0d\u540c\u7684\u662f\uff0c\u5b83\u4e3b\u8981\u662f\u63d0\u4f9b\u5404\u4e2a\u547d\u4ee4\u7684\u4f7f\u7528\u8303\u4f8b\uff0c\u8fd9\u5bf9\u4e8e\u8bb0\u4e0d\u6e05\u4f7f\u7528\u53c2\u6570\u7684\u7528\u6237\u6765\u8bf4\u975e\u5e38\u4fbf\u6377\uff0c\u6bd4\u4f7f\u7528 man \u6587\u6863\u66f4\u52a0\u65b9\u4fbf\u3002<\/p>\n

\"\"<\/p>\n

jq<\/strong><\/div>\n

json \u662f\u6211\u4eec\u7ecf\u5e38\u9700\u8981\u5904\u7406\u7684\u4e00\u79cd\u6570\u636e\u683c\u5f0f\uff0c\u5f88\u591a\u65f6\u5019\u63a5\u53e3\u8fd4\u56de\u7684\u4e5f\u662f json \u6570\u636e\u7ed3\u6784\uff0c\u800c\u901a\u8fc7\u4f7f\u7528 jq \u5de5\u5177\uff0c\u6211\u53ef\u4ee5\u975e\u5e38\u65b9\u4fbf\u5730\u67e5\u770b\u548c\u5904\u7406 json \u6570\u636e\u3002<\/p>\n

\"\"<\/p>\n

cloc<\/strong><\/div>\n

\u5bf9\u4e8e\u7a0b\u5e8f\u5458\u6765\u8bf4\u6700\u76f4\u89c2\u8bc4\u4ef7\u5de5\u4f5c\u91cf\u7684\u5c31\u662f\u5199\u7684\u4ee3\u7801\u884c\u6570\uff0c\u800c cloc \u5c31\u662f\u8fd9\u6837\u7684\u4e00\u6b3e\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u5ffd\u7565\u6389\u6362\u884c\u548c\u7a7a\u683c\u7b49\uff0c\u540c\u65f6\u5b83\u8fd8\u53ef\u4ee5\u6309\u7167\u7f16\u7a0b\u8bed\u8a00\u6765\u7edf\u8ba1\u5206\u7c7b\uff0c\u751f\u6210\u7684\u7ed3\u679c\u4e5f\u53ef\u4ee5\u4fdd\u5b58\u6210\u591a\u79cd\u683c\u5f0f\u3002<\/p>\n

\"\"<\/p>\n

tree<\/strong><\/div>\n

\u5217\u51fa\u6587\u4ef6\u76ee\u5f55\u7ed3\u6784\u7684\u547d\u4ee4\uff0c\u5bf9\u4e8e\u7ecf\u5e38\u5199\u5e2e\u52a9\u6587\u6863\u7684\u6211\uff0c\u901a\u8fc7\u8fd9\u4e2a\u547d\u4ee4\u53ef\u4ee5\u5f88\u8f7b\u677e\u5730\u83b7\u53d6\u5230\u9879\u76ee\u7684\u76ee\u5f55\u7ed3\u6784\uff0c\u7136\u540e\u5728 vim \u4e2d\uff0c\u53ef\u4ee5\u76f4\u63a5\u8f93\u51fa\u5230\u6587\u6863\u4e2d\uff0c\u975e\u5e38\u7684\u65b9\u4fbf<\/p>\n

\"\"<\/p>\n

mycli<\/strong><\/div>\n

mysql \u662f\u6211\u7ecf\u5e38\u4f7f\u7528\u7684\u6570\u636e\u5e93\uff0c\u6211\u7ecf\u5e38\u9700\u8981\u67e5\u8be2\u4e00\u4e9b\u8868\u7684\u4fe1\u606f\uff0c\u800c\u5f88\u591a\u65f6\u5019\u6709\u4e9b\u8868\u540d\u8bb0\u5f97\u5e76\u4e0d\u662f\u7279\u522b\u6e05\u695a\uff0c\u800c mycli \u5c31\u662f\u4e00\u4e2a mysql \u5ba2\u6237\u7aef\uff0c\u5b83\u63d0\u4f9b\u4e86\u81ea\u52a8\u8865\u5168\u7684\u529f\u80fd\uff0c\u6b64\u5916\uff0c\u5b83\u8fd8\u652f\u6301\u8bed\u6cd5\u9ad8\u4eae\uff0c\u8ba9\u4f60\u5199\u8d77 sql \u8bed\u53e5\u53d8\u5f97\u4e0d\u518d\u80c6\u602f\u3002<\/p>\n

\"\"<\/p>\n

\u603b\u7ed3<\/strong><\/div>\n

\u5176\u5b9e\u8fd8\u6709\u5f88\u591a\u5de5\u5177\u6211\u6ca1\u6709\u5217\u51fa\u6765\uff0c\u6bd5\u7adf\u7bc7\u5e45\u6709\u9650\uff0c\u6709\u4e9b\u5de5\u5177\u53ef\u80fd\u662f\u9488\u5bf9\u67d0\u79cd\u8bed\u8a00\u7684\uff0c\u6709\u4e9b\u53ef\u80fd\u662f\u4e0d\u7ecf\u5e38\u4f7f\u7528\u7684\u3002<\/p>\n

\u5bf9\u4e8e\u7a0b\u5e8f\u5458\u6765\u8bf4\uff0c\u5f88\u591a\u4eba\u4e4b\u6240\u4ee5\u559c\u6b22\u547d\u4ee4\u884c\u4e0b\u5de5\u4f5c\uff0c\u5c31\u662f\u56e0\u4e3a\u547d\u4ee4\u884c\u4e0b\u6709\u5f88\u591a\u597d\u7528\u7684\u5de5\u5177\u652f\u6301\u4ed6\u4eec\uff0c\u65f6\u4ee3\u5728\u53d1\u5c55\uff0c\u547d\u4ee4\u884c\u4e5f\u5728\u53d1\u5c55\uff0c\u5982\u4eca\u7684\u547d\u4ee4\u884c\u4e5f\u53ef\u4ee5\u50cf\u56fe\u5f62\u754c\u9762\u4e00\u6837\u663e\u793a\u5f97\u7eda\u4e3d\u591a\u5f69\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5de5\u6b32\u5584\u5176\u4e8b\u5fc5\u5148\u5229\u5176\u5668\uff0c\u5bf9\u4e8e\u4e00\u4e2a\u7ecf\u5e38\u5728\u7ec8\u7aef\u4e0b\u5de5\u4f5c\u7684\u6211\uff0c\u975e\u5e38\u559c\u6b22\u547d\u4ee4\u884c\u5de5\u5177\u7684\u4fbf\u6377\uff0c\u5728\u5e73\u5e38\u7684\u5de5\u4f5c\u4e2d\uff0c\u6211\u4f1a\u7ecf\u5e38\u4f7f\u7528\u5230\u5f88 […]<\/p>\n","protected":false},"author":1329,"featured_media":239826,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-239814","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/239814","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1329"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=239814"}],"version-history":[{"count":1,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/239814\/revisions"}],"predecessor-version":[{"id":239827,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/239814\/revisions\/239827"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/239826"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=239814"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=239814"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=239814"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}