{"id":212147,"date":"2021-03-03T08:26:32","date_gmt":"2021-03-03T00:26:32","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=212147"},"modified":"2021-02-23T16:29:27","modified_gmt":"2021-02-23T08:29:27","slug":"linux-commadn-jieshi","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/linux-commadn-jieshi.html","title":{"rendered":"\u5b66\u4e60Linux\u547d\u4ee4\u795e\u5668-\u770b\u4e0d\u61c2\u76f4\u63a5\u7ed9\u4f60\u89e3\u91ca"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u5927\u5bb6\u90fd\u77e5\u9053\uff0cLinux \u7cfb\u7edf\u6709\u975e\u5e38\u591a\u7684\u547d\u4ee4\uff0c\u800c\u4e14\u6bcf\u4e2a\u547d\u4ee4\u53c8\u6709\u975e\u5e38\u591a\u7684\u7528\u6cd5\uff0c\u60f3\u8981\u5168\u90e8\u8bb0\u4f4f\u6240\u6709\u547d\u4ee4\u7684\u6240\u6709\u7528\u6cd5\uff0c\u6050\u6015\u662f\u4e00\u4ef6\u4e0d\u53ef\u80fd\u5b8c\u6210\u7684\u4efb\u52a1\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"<\/a><\/p>\n

\u4e00\u822c\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u5b66\u4e60\u4e00\u4e2a\u547d\u4ee4\u65f6\uff0c\u8981\u4e48\u76f4\u63a5\u767e\u5ea6\u53bb\u641c\u7d22\u5b83\u7684\u7528\u6cd5\uff0c\u8981\u4e48\u5c31\u76f4\u63a5\u7528 man \u547d\u4ee4\u53bb\u67e5\u770b\u5b88\u5197\u957f\u7684\u5e2e\u52a9\u624b\u518c\u3002\u8fd9\u4e24\u4e2a\u90fd\u53ef\u4ee5\u5b9e\u73b0\u6211\u4eec\u7684\u76ee\u6807\uff0c\u4f46\u6709\u6ca1\u6709\u66f4\u7b80\u4fbf\u7684\u65b9\u5f0f\u5462\uff1f<\/p>\n

\u7b54\u6848\u662f\u5fc5\u987b\u6709\u7684\uff01\u4eca\u5929\u7ed9\u5927\u5bb6\u63a8\u8350\u4e00\u6b3e\u6709\u8da3\u800c\u5b9e\u7528\u5b66\u4e60\u795e\u5668 \u2014 kmdr\uff0c\u8ba9\u4f60\u89e3\u9501 Linux \u5b66\u4e60\u65b0\u59ff\u52bf\u3002<\/p>\n

kmdr \u5de5\u5177\u6700\u5927\u7684\u4eae\u70b9\u5c31\u662f\uff0c\u5982\u679c\u6709\u4e00\u4e2a\u957f\u4e32\u547d\u4ee4\u4f60\u770b\u4e0d\u61c2\u5b83\u7684\u7528\u6cd5\u53ca\u610f\u4e49\uff0c\u5b83\u5c06\u76f4\u63a5\u5206\u6a21\u5757\u7ed9\u4f60\u8be6\u7ec6\u89e3\u91ca\uff01\u8fd9\u4e2a\u529f\u80fd\u771f\u7684\u662f\u975e\u5e38\u5b9e\u7528\uff0c\u56e0\u4e3a\u6211\u4eec\u5728\u7f51\u4e0a\u6216\u4e66\u4e0a\u96be\u514d\u4f1a\u770b\u5230\u5404\u79cd\u5404\u6837\u7684\u547d\u4ee4\uff0c\u5982\u679c\u4f60\u770b\u4e0d\u61c2\uff0c\u90a3\u5c06\u6c38\u8fdc\u7559\u4e0b\u7591\u60d1\u3002\u800c\u8fd9\u4e2a\u5de5\u5177\u5c31\u50cf\u8001\u5e08\u4e00\u6837\uff0c\u6309\u6a21\u5757\u4e00\u4e2a\u4e2a\u544a\u8bc9\u4f60\u547d\u4ee4\u5404\u4e2a\u90e8\u5206\u7684\u7528\u6cd5\u53ca\u610f\u4e49\uff0c\u8ba9\u4f60\u4e00\u76ee\u4e86\u7136\uff01<\/p>\n

kmdr \u6536\u7eb3\u4e86\u975e\u5e38\u591a\u7684 CLI \u547d\u4ee4\u89e3\u91ca\uff0c\u4f8b\u5982\u5e38\u89c1\u7684 ansible, conda, docker, git, go, kubectl, mongo, mysql, npm, ruby gems, vagrant \u7b49\u7b49\uff0c\u4e0d\u4ec5\u5982\u6b64\uff0c\u90a3\u4e9b bash \u5185\u7f6e\u547d\u4ee4 \u5b83\u90fd\u80fd\u4e3a\u4f60\u89e3\u91ca\uff0c\u975e\u5e38\u7ed9\u529b\uff01<\/p>\n

\u4e0d\u7ba1\u4f60\u662f\u54ea\u4e2a\u9886\u57df\u7684\u7a0b\u5e8f\u5458\uff0ckmdr \u90fd\u80fd\u6700\u5927\u9650\u5ea6\u5730\u4e3a\u4f60\u63d0\u4f9b CLI \u547d\u4ee4\u5b66\u4e60\u5e2e\u52a9\u3002<\/p>\n

    \n
  1. \u00a0Bash Shell \u547d\u4ee4\uff08\u5982 echo\uff0cexport\uff0ccd\uff09<\/li>\n
  2. \u00a0\u5bb9\u5668\uff08\u5982 Docker\uff0ckubectl\uff09<\/li>\n
  3. \u00a0\u7248\u672c\u63a7\u5236\uff08\u5982 Git\uff09<\/li>\n
  4. \u00a0\u6570\u636e\u5e93\u670d\u52a1\u5668\u548c\u5ba2\u6237\u7aef\uff08\u5982 mysql\uff0cmongod\uff09<\/li>\n
  5. \u00a0\u90e8\u7f72\/\u4e91\uff08\u5982 now cloud\uff09<\/li>\n
  6. \u00a0\u6587\u4ef6\u548c\u5b58\u6863\u5de5\u5177\uff08\u5982 zip\uff0ctar\uff09<\/li>\n
  7. \u00a0\u5a92\u4f53\uff08\u5982 ffmpeg\uff0cyoutube-dl\uff09<\/li>\n
  8. \u00a0\u7f51\u7edc\/\u901a\u8baf\uff08\u5982 netstat\uff0cnmap\uff0ccurl\uff09<\/li>\n
  9. \u00a0\u5305\u7ba1\u7406\u5668\uff08\u5982 dpkg\uff0cpip\uff09<\/li>\n
  10. \u00a0\u7f16\u7a0b\u8bed\u8a00\/\u8fd0\u884c\u65f6\u73af\u5883\/\u7f16\u8bd1\u5668\uff08\u5982 go\uff0cpython\uff0cnode\uff0cgcc\uff09<\/li>\n
  11. \u00a0\u7cfb\u7edf\u7ba1\u7406 \/\u76d1\u63a7\uff08\u5982 crontab\uff0ctop\uff09<\/li>\n
  12. \u00a0\u6587\u5b57\u5904\u7406\uff08\u5982 awk\uff0csed\uff09<\/li>\n
  13. \u00a0\u6587\u672c\u7f16\u8f91\u5668\uff08\u5982 nano\uff0cvim\uff09<\/li>\n
  14. \u00a0\u5176\u4ed6\uff08\u5982 openssl\uff0cbash\uff0cbash64\uff09<\/li>\n<\/ol>\n

    \u8fd9\u4e2a\u94fe\u63a5\u91cc\u53ef\u4ee5\u67e5\u770b\u5b8c\u6574\u7684\u652f\u6301\u5217\u8868\uff1ahttps:\/\/github.com\/ediardo\/kmdr-cli#supported-programs)<\/p>\n

    \u5b89\u88c5 Kmdr CLI<\/strong><\/strong><\/span><\/div>\n

    kmdr \u662f\u7528 Nodejs \u7f16\u5199\u7684\u514d\u8d39\u5f00\u6e90\u5de5\u5177\uff0c\u9700\u8981 Nodejs \u7248\u672c 8.x \u6216\u66f4\u9ad8\u7248\u672c\u624d\u80fd\u8fd0\u884c\uff0c\u9700\u8981\u5927\u5bb6\u5148\u51c6\u5907\u597d\u8fd0\u884c\u73af\u5883\u3002<\/p>\n

    \u5b89\u88c5\u597d Nodejs \u4e4b\u540e\uff0c\u4f7f\u7528 Npm \u8f6f\u4ef6\u5305\u7ba1\u7406\u5668\u5b89\u88c5\u00a0 kmdr\uff1a<\/p>\n

     $\u00a0npm\u00a0install\u00a0kmdr@latest\u00a0--global<\/pre>\n

    \u4e0d\u60f3\u5b89\u88c5 Nodejs \u8fd9\u4e48\u9ebb\u70e6\uff1f\u6ca1\u5173\u7cfb\uff0c\u8fd9\u91cc\u6709\u4e00\u4e2a\u7f51\u7ad9\u53ef\u4ee5\u8ba9\u4f60\u5728 web \u6d4f\u89c8\u5668\u76f4\u63a5\u4f7f\u7528 kmdr \u2193\u2193<\/p>\n

    http:\/\/demo.kmdr.sh\/<\/a><\/p>\n

    <\/p>\n

    \u4f7f\u7528 Kmdr \u5728\u7ec8\u7aef\u4e2d\u663e\u793a CLI \u547d\u4ee4\u8bf4\u660e<\/strong><\/span><\/div>\n

    <\/strong><\/p>\n

    \u4e0b\u9762\u6211\u4eec\u901a\u8fc7\u4e00\u6761\u590d\u6742\u70b9\u7684\u547d\u4ee4\u4f5c\u4e3a\u4f8b\u5b50\uff0c\u6765\u770b\u770b kmdr \u7a76\u7adf\u6709\u591a\u5f3a\uff01<\/p>\n

    $\u00a0history\u00a0|\u00a0awk\u00a0'{print\u00a0$2}'\u00a0|\u00a0sort\u00a0|\u00a0uniq\u00a0-c\u00a0|\u00a0sort\u00a0-nr\u00a0|\u00a0head\u00a0-5<\/pre>\n

    \u9996\u5148\uff0c\u8fd0\u884c\u4e0b\u9762\u7684\u547d\u4ee4\uff0c\u8ba9 kmdr \u8fdb\u5165\u89e3\u91ca\u72b6\u6001\uff1a<\/p>\n

    $\u00a0kmdr\u00a0explain<\/pre>\n

    \u63a5\u7740\uff0c\u8f93\u5165\u6211\u4eec\u4e0a\u9762\u7684\u793a\u4f8b\u547d\u4ee4\uff0c\u7136\u540e\u6309 ENTER \u952e\uff1a<\/p>\n

    ?\u00a0Enter\u00a0your\u00a0command:\u00a0history\u00a0|\u00a0awk\u00a0'{print\u00a0$2}'\u00a0|\u00a0sort\u00a0|\u00a0uniq\u00a0-c\u00a0|\u00a0sort\u00a0-nr\u00a0|\u00a0head\u00a0-5\r\nhistory\r\nWith\u00a0no\u00a0options,\u00a0display\u00a0the\u00a0command\u00a0history\u00a0list\u00a0with\u00a0line\u00a0numbers.\r\n|\r\nA\u00a0pipe\u00a0serves\u00a0the\u00a0sdout\u00a0of\u00a0the\u00a0previous\u00a0command\u00a0as\u00a0input\u00a0(stdin)\u00a0to\u00a0the\u00a0next\u00a0one\r\nawk\r\npattern\u00a0scanning\u00a0and\u00a0processing\u00a0language\r\n{print\u00a0$2}\r\nAn\u00a0argument\r\n|\r\nA\u00a0pipe\u00a0serves\u00a0the\u00a0sdout\u00a0of\u00a0the\u00a0previous\u00a0command\u00a0as\u00a0input\u00a0(stdin)\u00a0to\u00a0the\u00a0next\u00a0one\r\nsort\r\nSort\u00a0lines\u00a0of\u00a0text\u00a0files\r\n|\r\nA\u00a0pipe\u00a0serves\u00a0the\u00a0sdout\u00a0of\u00a0the\u00a0previous\u00a0command\u00a0as\u00a0input\u00a0(stdin)\u00a0to\u00a0the\u00a0next\u00a0one\r\nuniq\r\nReport\u00a0or\u00a0omit\u00a0repeated\u00a0lines\r\n-c,\u00a0--count\r\nPrefix\u00a0lines\u00a0by\u00a0the\u00a0number\u00a0of\u00a0occurrences\r\n|\r\nA\u00a0pipe\u00a0serves\u00a0the\u00a0sdout\u00a0of\u00a0the\u00a0previous\u00a0command\u00a0as\u00a0input\u00a0(stdin)\u00a0to\u00a0the\u00a0next\u00a0one\r\nsort\r\nSort\u00a0lines\u00a0of\u00a0text\u00a0files\r\n-n,\u00a0--numeric-sort\r\nCompare\u00a0according\u00a0to\u00a0string\u00a0numerical\u00a0value\r\n-r,\u00a0--reverse\r\nReverse\u00a0the\u00a0result\u00a0of\u00a0comparisons\r\n|\r\nA\u00a0pipe\u00a0serves\u00a0the\u00a0sdout\u00a0of\u00a0the\u00a0previous\u00a0command\u00a0as\u00a0input\u00a0(stdin)\u00a0to\u00a0the\u00a0next\u00a0one\r\nhead\r\nOutput\u00a0the\u00a0first\u00a0part\u00a0of\u00a0files\r\n-5\r\nAn\u00a0argument\r\n🤖\u00a0Did\u00a0we\u00a0help\u00a0you\u00a0better\u00a0understand\u00a0this\u00a0command?\u00a0(Use\u00a0arrow\u00a0keys)\r\n\u276f\u00a0Skip\u00a0&\u00a0Exit\r\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\nYes\r\nNo\r\n<\/pre>\n

    \u53ef\u4ee5\u770b\u5230 kmdr \u8fd9\u4e2a\u547d\u4ee4\u7684\u5f3a\u5927\u4e4b\u5904\uff0c\u5b83\u5c06\u90a3\u6761\u590d\u6742\u547d\u4ee4\u4e2d\u6bcf\u4e2a\u90e8\u5206\u7684\u89e3\u91ca\u90fd\u7ed9\u4f60\u5217\u51fa\u6765\u4e86\uff0c\u8ba9\u4f60\u4e00\u76ee\u4e86\u7136\uff0c\u4e00\u770b\u5c31\u61c2\uff01<\/p>\n

    \u5982\u679c\u4e00\u4e2a\u957f\u4e32\u590d\u6742\u547d\u4ee4\u91cc\u9762\u5305\u542b\u4e86\u591a\u4e2a\u5b50\u547d\u4ee4\uff0ckmdr \u4e5f\u53ef\u4ee5\u4e00\u4e2a\u4e2a\u4e3a\u4f60\u89e3\u91ca\u3002<\/p>\n

    \u8fd8\u53ef\u4ee5\u89e3\u91ca\u5177\u6709\u5206\u7ec4\u9009\u9879\u7684\u547d\u4ee4\u3002<\/p>\n

    $\u00a0kmdr\u00a0explain\r\n?\u00a0Enter\u00a0your\u00a0command:\u00a0rsync\u00a0-avz\u00a0--exclude\u00a0'liangxu'\u00a0dir1\/\u00a0dir2\/\r\nrsync\r\nA\u00a0fast,\u00a0versatile,\u00a0remote\u00a0(and\u00a0local)\u00a0file-copying\u00a0tool\r\n-a,\u00a0--archive\r\nThis\u00a0is\u00a0equivalent\u00a0to\u00a0-rlptgoD.\r\n-v,\u00a0--verbose\r\nThis\u00a0option\u00a0increases\u00a0the\u00a0amount\u00a0of\u00a0information\u00a0you\u00a0are\u00a0given\u00a0during\u00a0the\u00a0transfer.\r\n-z,\u00a0--compress\r\nWith\u00a0this\u00a0option,\u00a0rsync\u00a0compresses\u00a0the\u00a0file\u00a0data\u00a0as\u00a0it\u00a0is\u00a0sent\u00a0to\u00a0the\u00a0destination\u00a0machine,which\u00a0reduces\u00a0the\u00a0amount\u00a0of\u00a0data\u00a0being\u00a0transmitted\u00a0--\u00a0something\u00a0that\u00a0is\u00a0useful\u00a0over\u00a0a\u00a0slow\u00a0connection.\r\n--exclude\r\nThis\u00a0option\u00a0is\u00a0a\u00a0simplified\u00a0form\u00a0of\u00a0the\u00a0--filter\u00a0option\u00a0that\u00a0defaults\u00a0to\u00a0an\u00a0exclude\u00a0rule\u00a0anddoes\u00a0not\u00a0allow\u00a0the\u00a0full\u00a0rule-parsing\u00a0syntax\u00a0of\u00a0normal\u00a0filter\u00a0rules.\r\nliangxu\r\nAn\u00a0argument\r\ndir1\/\r\nAn\u00a0argument\r\ndir2\/\r\nAn\u00a0argument\r\nDid we help you better understand this command? (Use arrow keys)\r\n\u276f\u00a0Skip\u00a0&\u00a0Exit\r\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\r\nYes\r\nNo<\/pre>\n
    \u603b\u7ed3<\/strong><\/strong><\/span><\/div>\n

    \u4e2a\u4eba\u8ba4\u4e3a\uff0c\u67e5\u770b CLI \u547d\u4ee4\u7684\u5e2e\u52a9\u6587\u6863\uff0c\u4e00\u6765\u5176\u5185\u5bb9\u591a\u800c\u957f\uff0c\u4e8c\u6765\u4ed4\u7ec6\u53bb\u627e\u4f1a\u6d6a\u8d39\u65f6\u95f4\u548c\u7cbe\u529b\u3002\u800c kmdr \u53ea\u8981\u4f60\u8f93\u5165\u4f60\u4e0d\u61c2\u7684\u547d\u4ee4\uff0c\u76f4\u63a5\u5c31\u7ed9\u4f60\u6574\u660e\u767d\uff0c\u96be\u9053\u5b83\u4e0d\u9999\u5417\uff1f\u5927\u5bb6\u5feb\u70b9\u53bb\u8bd5\u8bd5\u5427\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

    \u4e00\u822c\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u5b66\u4e60\u4e00\u4e2a\u547d\u4ee4\u65f6\uff0c\u8981\u4e48\u76f4\u63a5\u767e\u5ea6\u53bb\u641c\u7d22\u5b83\u7684\u7528\u6cd5\uff0c\u8981\u4e48\u5c31\u76f4\u63a5\u7528 man \u547d\u4ee4\u53bb\u67e5\u770b\u5b88\u5197\u957f\u7684\u5e2e\u52a9\u624b\u518c\u3002 […]<\/p>\n","protected":false},"author":643,"featured_media":212156,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-212147","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\/212147","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\/643"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=212147"}],"version-history":[{"count":7,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/212147\/revisions"}],"predecessor-version":[{"id":212149,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/212147\/revisions\/212149"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/212156"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=212147"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=212147"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=212147"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}