{"id":89263,"date":"2024-02-19T01:49:12","date_gmt":"2024-02-18T17:49:12","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=89263"},"modified":"2024-02-19T01:49:12","modified_gmt":"2024-02-18T17:49:12","slug":"command-clever-mind","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/command-clever-mind.html","title":{"rendered":"Linux\u547d\u4ee4\u5feb\u901f\u5de7\u8bb0\u6cd5"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nLinux \u65b0\u624b\u5f80\u5f80\u5bf9\u547d\u4ee4\u884c\u5fc3\u5b58\u754f\u60e7\u3002\u90e8\u5206\u539f\u56e0\u662f\u56e0\u4e3a\u9700\u8981\u8bb0\u5fc6\u5927\u91cf\u7684\u547d\u4ee4\uff0c\u6bd5\u7adf\u638c\u63e1\u547d\u4ee4\u662f\u9ad8\u6548\u4f7f\u7528\u547d\u4ee4\u884c\u7684\u524d\u63d0\u4e0d\u5e78\u7684\u662f\uff0c\u5b66\u4e60\u8fd9\u4e9b\u547d\u4ee4\u5e76\u65e0\u6377\u5f84\uff0c\u7136\u800c\u5728\u4f60\u5f00\u59cb\u5b66\u4e60\u547d\u4ee4\u4e4b\u521d\uff0c\u6709\u4e9b\u5de5\u5177\u8fd8\u662f\u53ef\u4ee5\u5e2e\u5230\u4f60\u7684\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
history<\/strong><\/div>\n

\"\"<\/p>\n

 <\/p>\n

\u9996\u5148\u8981\u4ecb\u7ecd\u7684\u662f\u547d\u4ee4\u884c\u5de5\u5177 history\uff0c\u5b83\u80fd\u5e2e\u4f60\u8bb0\u4f4f\u90a3\u4e9b\u4f60\u66fe\u7ecf\u7528\u8fc7\u7684\u547d\u4ee4\u3002\u5305\u62ec\u5e94\u7528\u6700\u5e7f\u6cdb\u7684 Bash \u5728\u5185\u7684\u5927\u591a\u6570 Linux shell\uff0c\u90fd\u4f1a\u521b\u5efa\u4e00\u4e2a\u5386\u53f2\u6587\u4ef6\u6765\u5305\u542b\u90a3\u4e9b\u4f60\u8f93\u5165\u8fc7\u7684\u547d\u4ee4\u3002\u5982\u679c\u4f60\u7528\u7684\u662f Bash\uff0c\u8fd9\u4e2a\u5386\u53f2\u6587\u4ef6\u5c31\u662f \/home\/\/.bash_history\u3002<\/p>\n

\u8fd9\u4e2a\u5386\u53f2\u6587\u4ef6\u662f\u7eaf\u6587\u672c\u683c\u5f0f\u7684\uff0c\u4f60\u53ef\u4ee5\u7528\u4efb\u610f\u7684\u6587\u672c\u7f16\u8f91\u5668\u6253\u5f00\u6765\u6d4f\u89c8\u548c\u641c\u7d22\u3002<\/p>\n

apropos<\/strong><\/div>\n

\u786e\u5b9e\u5b58\u5728\u4e00\u4e2a\u53ef\u4ee5\u5e2e\u4f60\u627e\u5230\u5176\u4ed6\u547d\u4ee4\u7684\u547d\u4ee4\u3002\u8fd9\u4e2a\u547d\u4ee4\u5c31\u662f apropos\uff0c\u5b83\u80fd\u5e2e\u4f60\u627e\u51fa\u5408\u9002\u7684\u547d\u4ee4\u6765\u5b8c\u6210\u4f60\u7684\u641c\u7d22\u3002\u6bd4\u5982\uff0c\u5047\u8bbe\u4f60\u9700\u8981\u77e5\u9053\u54ea\u4e2a\u547d\u4ee4\u53ef\u4ee5\u5217\u51fa\u76ee\u5f55\u7684\u5185\u5bb9\uff0c\u4f60\u53ef\u4ee5\u8fd0\u884c\u4e0b\u9762\u547d\u4ee4:<\/p>\n

apropos \"list directory\"\r\n<\/pre>\n

\"\"<\/p>\n

\u8fd9\u5c31\u641c\u7d22\u51fa\u7ed3\u679c\u4e86\uff0c\u975e\u5e38\u76f4\u63a5\u3002\u7ed9 \u201cdirectory\u201d \u52a0\u4e0a\u590d\u6570\u540e\u518d\u8bd5\u4e00\u4e0b\u3002<\/p>\n

apropos \"list directories\"\r\n<\/pre>\n

\u8fd9\u6b21\u6ca1\u7528\u4e86\u3002apropos \u6240\u4f5c\u7684\u5176\u5b9e\u5c31\u662f\u641c\u7d22\u4e00\u7cfb\u5217\u547d\u4ee4\u7684\u63cf\u8ff0\u3002\u63cf\u8ff0\u4e0d\u5339\u914d\u7684\u547d\u4ee4\u4e0d\u4f1a\u7eb3\u5165\u7ed3\u679c\u4e2d\u3002<\/p>\n

\u8fd8\u6709\u5176\u4ed6\u7684\u7528\u6cd5\u3002\u901a\u8fc7 -a \u6807\u5fd7\uff0c\u4f60\u53ef\u4ee5\u4ee5\u66f4\u7075\u6d3b\u7684\u65b9\u5f0f\u6765\u589e\u52a0\u641c\u7d22\u5173\u952e\u5b57\u3002\u8bd5\u8bd5\u8fd9\u6761\u547d\u4ee4:<\/p>\n

apropos \"match pattern\"\r\n\r\n\"\"\r\n<\/pre>\n

\u4f60\u4f1a\u89c9\u5f97\u5e94\u8be5\u4f1a\u6709\u4e00\u4e9b\u5339\u914d\u7684\u5185\u5bb9\u51fa\u73b0\uff0c\u6bd4\u5982 grep \u5bf9\u5417? \u7136\u800c\uff0c\u5b9e\u9645\u4e0a\u5e76\u6ca1\u6709\u5339\u914d\u51fa\u4efb\u4f55\u7ed3\u679c\u3002\u518d\u8bf4\u4e00\u6b21\uff0capropos \u53ea\u4f1a\u6839\u636e\u5b57\u9762\u5185\u5bb9\u8fdb\u884c\u641c\u7d22\u3002<\/p>\n

\u73b0\u5728\u8ba9\u6211\u4eec\u8bd5\u7740\u7528 -a \u6807\u5fd7\u6765\u628a\u5355\u8bcd\u5206\u5272\u5f00\u6765\u3002\uff08LCTT \u8bd1\u6ce8\uff1a\u8be5\u9009\u9879\u7684\u610f\u601d\u662f\u201cand\u201d\uff0c\u5373\u591a\u4e2a\u5173\u952e\u5b57\u90fd\u5b58\u5728\uff0c\u4f46\u662f\u4e0d\u9700\u8981\u6b63\u597d\u662f\u8fde\u5728\u4e00\u8d77\u7684\u5b57\u7b26\u4e32\u3002\uff09<\/p>\n

apropos \"match\" -a \"pattern\"\r\n<\/pre>\n

\u8fd9\u4e00\u4e0b\uff0c\u4f60\u53ef\u4ee5\u770b\u5230\u5f88\u591a\u671f\u671b\u7684\u7ed3\u679c\u4e86\u3002<\/p>\n

apropos \u662f\u4e00\u4e2a\u5f88\u68d2\u7684\u5de5\u5177\uff0c\u4e0d\u8fc7\u4f60\u9700\u8981\u7559\u610f\u5b83\u7684\u7f3a\u9677\u3002<\/p>\n

ZSH<\/strong><\/div>\n

\"\"<\/p>\n

 <\/p>\n

ZSH \u5176\u5b9e\u5e76\u4e0d\u662f\u7528\u4e8e\u8bb0\u5fc6\u547d\u4ee4\u7684\u5de5\u5177\u3002\u5b83\u5176\u5b9e\u662f\u4e00\u79cd shell\u3002\u4f60\u53ef\u4ee5\u7528 ZSH \u6765\u66ff\u4ee3 Bash \u4f5c\u4e3a\u4f60\u7684\u547d\u4ee4\u884c shell\u3002ZSH \u5305\u542b\u4e86\u81ea\u52a8\u7ea0\u9519\u673a\u5236\uff0c\u80fd\u5728\u4f60\u8f93\u5165\u547d\u4ee4\u7684\u65f6\u5019\u7ed9\u4f60\u4e88\u63d0\u793a\u3002\u5f00\u542f\u8be5\u529f\u80fd\u540e\uff0c\u5b83\u4f1a\u63d0\u793a\u4f60\u76f8\u8fd1\u7684\u9009\u62e9\u3002\u5728 ZSH \u4e2d\u4f60\u53ef\u4ee5\u50cf\u5f80\u5e38\u4e00\u6837\u4f7f\u7528\u547d\u4ee4\u884c\uff0c\u540c\u65f6\u4f60\u8fd8\u80fd\u4eab\u53d7\u5230\u6781\u5ea6\u5b89\u5168\u7684\u7f51\u7edc\u4ee5\u53ca\u5176\u4ed6\u4e00\u4e9b\u975e\u5e38\u597d\u7528\u7684\u7279\u6027\u3002\u5145\u5206\u5229\u7528 ZSH \u7684\u6700\u7b80\u5355\u65b9\u6cd5\u5c31\u662f\u4f7f\u7528 Oh-My-ZSH\u3002<\/p>\n

\u901f\u8bb0\u8868<\/strong><\/div>\n

\u6700\u540e\uff0c\u4e5f\u53ef\u80fd\u662f\u6700\u95f4\u7684\u65b9\u6cd5\u5c31\u662f\u4f7f\u7528 \u901f\u8bb0\u8868\u3002<\/p>\n

\u6709\u5f88\u591a\u5728\u7ebf\u7684\u901f\u8bb0\u8868\uff0c\u6bd4\u5982\u8fd9\u4e2a \u53ef\u4ee5\u5e2e\u52a9\u4f60\u5feb\u901f\u67e5\u8be2\u547d\u4ee4\u3002<\/p>\n

 <\/p>\n

\"\"<\/p>\n

\u4e3a\u4e86\u5feb\u901f\u67e5\u8be2\uff0c\u4f60\u53ef\u4ee5\u5bfb\u627e\u56fe\u7247\u683c\u5f0f\u7684\u901f\u8bb0\u8868\uff0c\u7136\u540e\u5c06\u5b83\u8bbe\u7f6e\u4e3a\u4f60\u7684\u684c\u9762\u5899\u7eb8\u3002<\/p>\n

\u8fd9\u5e76\u4e0d\u662f\u8bb0\u5fc6\u547d\u4ee4\u7684\u6700\u597d\u65b9\u6cd5\uff0c\u4f46\u662f\u8fd9\u4e48\u505a\u53ef\u4ee5\u5e2e\u4f60\u8282\u7701\u5728\u7ebf\u641c\u7d22\u9057\u5fd8\u547d\u4ee4\u7684\u65f6\u95f4\u3002<\/p>\n

\u5728\u5b66\u4e60\u65f6\u4f9d\u8d56\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u6700\u7ec8\u4f60\u4f1a\u53d1\u73b0\u4f60\u4f1a\u8d8a\u6765\u8d8a\u5c11\u5730\u4f7f\u7528\u8fd9\u4e9b\u5de5\u5177\u3002\u6ca1\u6709\u4eba\u80fd\u591f\u8bb0\u4f4f\u6240\u6709\u7684\u4e8b\u60c5\uff0c\u56e0\u6b64\u5076\u5c14\u9057\u5fd8\u6389\u67d0\u4e9b\u4e1c\u897f\u6216\u8005\u9047\u5230\u67d0\u4e9b\u6ca1\u6709\u89c1\u8fc7\u7684\u4e1c\u897f\u4e5f\u5f88\u6b63\u5e38\u3002\u8fd9\u4e5f\u662f\u8fd9\u4e9b\u5de5\u5177\u4ee5\u53ca\u56e0\u7279\u7f51\u5b58\u5728\u7684\u610f\u4e49<\/p>\n

via: https:\/\/www.maketecheasier.com\/remember-linux-commands\/<\/a><\/p>\n

\u4f5c\u8005\uff1aNick Congleton<\/a> \u8bd1\u8005\uff1alujun9972<\/a> \u6821\u5bf9\uff1awxy<\/a><\/p>\n

\u672c\u6587\u7531 LCTT<\/a> \u539f\u521b\u7f16\u8bd1\uff0cLinux\u4e2d\u56fd<\/a> \u8363\u8a89\u63a8\u51fa<\/p>\n

\n

\u539f\u6587\u6765\u81ea\uff1ahttps:\/\/linux.cn\/article-9093-1.html<\/a><\/p>\n

\u672c\u6587\u5730\u5740\uff1ahttp:\/\/lrxjmw.cn\/command-clever-mind.html<\/a>\u7f16\u8f91\uff1a\u51af\u745e\u6d9b\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

\u5bfc\u8bfb Linux \u65b0\u624b\u5f80\u5f80\u5bf9\u547d\u4ee4\u884c\u5fc3\u5b58\u754f\u60e7\u3002\u90e8\u5206\u539f\u56e0\u662f\u56e0\u4e3a\u9700\u8981\u8bb0\u5fc6\u5927\u91cf\u7684\u547d\u4ee4\uff0c\u6bd5\u7adf\u638c\u63e1\u547d\u4ee4\u662f\u9ad8\u6548\u4f7f\u7528\u547d\u4ee4\u884c\u7684\u524d […]<\/p>\n","protected":false},"author":1329,"featured_media":89302,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-89263","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\/89263","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=89263"}],"version-history":[{"count":5,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/89263\/revisions"}],"predecessor-version":[{"id":89304,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/89263\/revisions\/89304"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/89302"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=89263"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=89263"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=89263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}