2.\u4f7f\u7528\u547d\u4ee4\u884c\u522b\u540d<\/strong><\/div>\n\u4f7f\u7528\u547d\u4ee4\u884c\u754c\u9762\u800c\u4e0d\u662f GUI \u7684\u53e6\u4e00\u4e2a\u5de8\u5927\u597d\u5904\u662f\u5927\u591a\u6570 Linux shell \u5141\u8bb8\u60a8\u8bbe\u7f6e\u547d\u4ee4\u884c\u522b\u540d\uff0c\u8fd9\u4e9b\u53d8\u91cf\u662f\u5728 shell \u4e2d\u8c03\u7528\u65f6\u5145\u5f53\u5bf9\u53e6\u4e00\u4e2a\u547d\u4ee4\u7684\u5f15\u7528\u7684\u53d8\u91cf\u3002<\/p>\n
\u522b\u540d\u5c31\u50cf\u7f16\u7a0b\u8bed\u8a00\u4e2d\u7684\u5b57\u7b26\u4e32\u53d8\u91cf\u3002\u53d8\u91cf\u540d\u901a\u5e38\u5f88\u77ed\uff0c\u4f46\u662f\u5f53\u4f60\u6253\u5370\u5b83\u7684\u503c\u65f6\uff0c\u5b83\u53ef\u4ee5\u4e00\u6b21\u6253\u5370\u51fa\u4e00\u767e\u4e2a\uff0c\u751a\u81f3\u4e0a\u5343\u4e2a\u5b57\u3002<\/p>\n
\u56e0\u6b64\uff0c\u5982\u679c\u6709\u4e00\u4e2a\u60a8\u7ecf\u5e38\u8fd0\u884c\u7684\u5197\u957f\u547d\u4ee4\uff0c\u60a8\u53ef\u4ee5\u4e3a\u5176\u8bbe\u7f6e\u4e00\u4e2a\u77ed\u5f97\u591a\u7684\u522b\u540d\u4ee5\u8282\u7701\u65f6\u95f4\u3002<\/p>\n
\u5047\u8bbe\u60a8\u6b63\u5728\u4ece\u4e8b\u4e00\u4e2a\u7f51\u7edc\u6293\u53d6\u9879\u76ee\uff0c\u5e76\u4e14\u9700\u8981\u4f7f\u7528\u4ee5\u4e0b cd \u547d\u4ee4\u7ecf\u5e38\u5bfc\u822a\u5230\u60a8\u7684\u9879\u76ee\u76ee\u5f55\uff1a<\/p>\n
\r\ncd \/home\/linuxmi\/project\/python\/scraper\/myscraper\r\n<\/pre>\n\u8f93\u5165\u4e00\u6b21\u80af\u5b9a\u662f\u5c0f\u83dc\u4e00\u789f\u3002\u4f46\u662f\uff0c\u5982\u679c\u60a8\u9700\u8981\u591a\u6b21\u91cd\u65b0\u8f93\u5165\u76f8\u540c\u7684\u547d\u4ee4\u600e\u4e48\u529e\uff1f\u4e5f\u8bb8 20\u300130 \u6216 50 \u6b21\uff1f\u66f4\u660e\u667a\u7684\u9009\u62e9\u662f\u8bbe\u7f6e\u4e00\u4e2a\u522b\u540d\u6765\u66ff\u4ee3\u4e0a\u8ff0\u547d\u4ee4\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528 alias \u547d\u4ee4\u6267\u884c\u6b64\u64cd\u4f5c\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n
\r\nalias cdproj=\"cd \/home\/linuxmi\/project\/python\/scraper\/myscraper\"\r\n<\/pre>\n\u73b0\u5728\uff0c\u5f53\u60a8\u5728\u7ec8\u7aef\u4e2d\u952e\u5165cdproj\u65f6\uff0cshell \u4f1a\u5c06\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u66f4\u6539\u4e3a\u9879\u76ee\u6587\u4ef6\u5939\u3002<\/p>\n
\u8981\u6c38\u4e45\u4fdd\u5b58\u522b\u540d\uff0c\u8bf7\u5c06\u4e0a\u8ff0\u547d\u4ee4\u6dfb\u52a0\u5230\u60a8\u7684 shell \u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u5373.bashrc\u3001.zshrc\u7b49\u3002<\/p>\n
3. \u4f7f\u7528 Shell \u81ea\u52a8\u5b8c\u6210\u529f\u80fd<\/strong><\/div>\n\u5927\u591a\u6570 Linux shell \u4e3a\u60a8\u63d0\u4f9b\u81ea\u52a8\u5b8c\u6210\u529f\u80fd\uff0c\u4f7f\u60a8\u53ef\u4ee5\u66f4\u8f7b\u677e\u5730\u8f93\u5165\u547d\u4ee4\uff0c\u7c7b\u4f3c\u4e8e\u60a8\u5728\u667a\u80fd\u624b\u673a\u4e0a\u7684\u529f\u80fd\u3002<\/p>\n
\u5f53\u60a8\u6307\u5b9a\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u8def\u5f84\u65f6\uff0c\u5927\u591a\u6570\u65f6\u5019\uff0c\u60a8\u53ef\u4ee5\u6309 Tab \u952e\u81ea\u52a8\u5b8c\u6210\u8def\u5f84\u8868\u8fbe\u5f0f\u3002\u6839\u636e\u60a8\u4f7f\u7528\u7684 shell\uff0c\u60a8\u751a\u81f3\u53ef\u4ee5\u901a\u8fc7\u6309 Tab \u81ea\u52a8\u5b8c\u6210\u5176\u4ed6 Linux \u547d\u4ee4\u3002<\/p>\n
\u4ee5 \/etc\/folder1\/folder2\/folder3 \u76ee\u5f55\u7ed3\u6784\u4e3a\u4f8b\u3002\u5982\u679c\u60a8\u5728folder1\u4e2d\u5e76\u4e14\u60f3\u8981\u5c06\u76ee\u5f55\u66f4\u6539\u4e3afolder2\uff0c\u5219\u53ef\u4ee5\u952e\u5165\u201c cd fold \u201d\uff0c\u7136\u540e\u7acb\u5373\u6309Tab\u952e\u8ba9 shell \u4e3a\u60a8\u5b8c\u6210\u547d\u4ee4\u3002<\/p>\n
4. \u4e3a\u91cd\u590d\u64cd\u4f5c\u521b\u5efa Shell \u811a\u672c<\/strong><\/div>\n\u5982\u679c\u60a8\u6709\u4e00\u7cfb\u5217\u7ecf\u5e38\u8fd0\u884c\u7684\u547d\u4ee4\uff0c\u90a3\u4e48\u4e3a\u91cd\u590d\u6027\u4efb\u52a1\u7f16\u5199\u60a8\u81ea\u5df1\u7684 shell \u811a\u672c\u4f1a\u5f88\u6709\u5e2e\u52a9\u3002\u5bf9\u4e8e\u7ecf\u5e38\u9700\u8981\u4f7f\u7528\u4e00\u7cfb\u5217\u64cd\u4f5c\u6e90\u6587\u4ef6\u7684\u547d\u4ee4\u6765\u7f16\u8bd1\u548c\u6267\u884c\u7a0b\u5e8f\u7684\u7a0b\u5e8f\u5458\u6765\u8bf4\uff0c\u5b83\u5c24\u5176\u662f\u6551\u661f\u3002<\/p>\n
\u5047\u8bbe\u60a8\u5fc5\u987b\u5728\u4e00\u5929\u4e2d\u591a\u6b21\u8fd0\u884c\u4e00\u7ec4\u547d\u4ee4\u3002\u8fd9\u53ef\u80fd\u5305\u62ec\u5c06\u66f4\u6539\u63d0\u4ea4\u5230\u9879\u76ee\u7684\u4e2d\u592e Git \u5b58\u50a8\u5e93\u3001\u5c06\u67d0\u4e9b\u6587\u4ef6\u4ece\u4e00\u4e2a\u4f4d\u7f6e\u79fb\u52a8\u5230\u53e6\u4e00\u4e2a\u4f4d\u7f6e\u6216\u4ec5\u66f4\u6539\u7279\u5b9a\u6587\u4ef6\u5939\u4e2d\u6700\u540e\u4fee\u6539\u7684\u6587\u4ef6\u7684\u540d\u79f0\u7684\u547d\u4ee4\u3002<\/p>\n
\u60a8\u53ef\u4ee5\u7f16\u5199\u4e00\u4e2a shell \u811a\u672c\u6765\u81ea\u52a8\u6267\u884c\u6b64\u8fc7\u7a0b\uff0c\u800c\u4e0d\u662f\u5728\u7ec8\u7aef\u4e2d\u624b\u52a8\u952e\u5165\u547d\u4ee4\u3002\u5047\u8bbe\u60a8\u9700\u8981\u4f7f\u7528 Git \u6dfb\u52a0\u548c\u63d0\u4ea4\u5bf9\u9879\u76ee\u6e90\u4ee3\u7801\u6240\u505a\u7684\u66f4\u6539\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b shell \u811a\u672c\u6765\u81ea\u52a8\u6267\u884c\u6b64\u64cd\u4f5c\uff1a<\/p>\n
\r\n#!\/bin\/bash\r\ncd \/home\/username\/project\/directory\/\r\ngit add --all\r\ngit commit -m \"Another change\"\r\necho \"All changes were successfully committed\"\r\n<\/pre>\n\u5c06\u6587\u4ef6\u4fdd\u5b58\u4e3a\u201c \u200b\u200bchanges.sh\u200b\u200b \u201d\uff0c\u7136\u540e\u5728\u60a8\u60f3\u5c06\u66f4\u6539\u63d0\u4ea4\u5230\u5b58\u50a8\u5e93\u65f6\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fd0\u884c\u5b83\uff1a<\/p>\n
\r\n.\/changes.sh\r\n<\/pre>\n\u8fd0\u884c\u811a\u672c\u4e4b\u524d\uff0c\u786e\u4fdd\u4f7f\u7528 chmod \u6388\u4e88\u6587\u4ef6\u6267\u884c\u6743\u9650\uff1a<\/p>\n
\r\nsudo chmod +X changes.sh\r\n<\/pre>\n\u5c0f\u63d0\u793a\uff1a\u5728 Linux \u4e0a\u8bbf\u95ee\u547d\u4ee4\u5386\u53f2\u8bb0\u5f55<\/strong><\/div>\nLinux \u5c3d\u529b\u51cf\u5c11\u60a8\u82b1\u5728\u547d\u4ee4\u884c\u4e0a\u7684\u65f6\u95f4\u548c\u7cbe\u529b\u3002Shell \u522b\u540d\u3001\u811a\u672c\u548c\u81ea\u52a8\u5b8c\u6210\u529f\u80fd\u4f7f\u7ec8\u7aef\u7528\u6237\u53ef\u4ee5\u65b9\u4fbf\u5730\u952e\u5165\u547d\u4ee4\uff0c\u8fd9\u6837\u4ed6\u4eec\u5c31\u53ef\u4ee5\u4eab\u53d7\u5728 Shell \u4e2d\u5de5\u4f5c\u7684\u4e50\u8da3\u3002<\/p>\n
\u53e6\u4e00\u4e2a\u8fd9\u6837\u7684\u529f\u80fd\u662f\u80fd\u591f\u4f7f\u7528\u547d\u4ee4\u5386\u53f2\u8bbf\u95ee\u4ee5\u524d\u8f93\u5165\u7684\u547d\u4ee4\u3002\u5728\u7ec8\u7aef\u5185\u65f6\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u5411\u4e0a\u952e\u6d4f\u89c8\u547d\u4ee4\u5386\u53f2\u8bb0\u5f55\uff0c\u7136\u540e\u6309 Enter \u952e\u53d1\u51fa\u547d\u4ee4\u3002<\/p>\n
\u5047\u8bbe\u60a8\u5728\u4e24\u4e2a\u5c0f\u65f6\u524d\u5c06\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u66f4\u6539\u4e3a\u9879\u76ee\u6587\u4ef6\u5939\u3002\u60a8\u53ef\u4ee5\u4e00\u76f4\u6309\u5411\u4e0a\u952e\uff0c\u76f4\u5230\u627e\u5230\u60a8\u9700\u8981\u7684\u547d\u4ee4\u3002\u7136\u540e\uff0c\u53ea\u9700\u6309Enter\u518d\u6b21\u53d1\u51fa\u547d\u4ee4\u3002<\/p>\n
\u60a8\u53ea\u80fd\u67e5\u770b\u548c\u91cd\u65b0\u6267\u884c\u5728\u5f53\u524d\u7ec8\u7aef\u4f1a\u8bdd\u4e2d\u8fd0\u884c\u7684\u547d\u4ee4\u3002<\/p>\n
Linux \u7ec8\u7aef\u8ba9\u521d\u5b66\u8005\u8f7b\u677e\u4e0a\u624b<\/strong><\/div>\n\u867d\u7136\u547d\u4ee4\u884c\u4e00\u5f00\u59cb\u53ef\u80fd\u4f1a\u8ba9\u65b0\u624b\u671b\u800c\u751f\u754f\uff0c\u4f46\u4ed6\u4eec\u5f88\u5feb\u610f\u8bc6\u5230\u4f7f\u7528\u7ec8\u7aef\u6267\u884c\u7b80\u5355\u548c\u590d\u6742\u7684\u64cd\u4f5c\u90fd\u662f\u6709\u5229\u7684\uff0c\u56e0\u4e3a\u5b83\u4f7f\u4ed6\u4eec\u80fd\u591f\u66f4\u597d\u5730\u63a7\u5236\u81ea\u5df1\u7684\u7cfb\u7edf\u3002<\/p>\n
\u53e6\u5916\u60f3\u8bf4\u7684\u60a8\u53ef\u4ee5\u9009\u62e9\u5b8c\u5168\u4f7f\u7528\u56fe\u5f62\u754c\u9762\u6765\u4f7f\u7528 Linux \u684c\u9762\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u719f\u6089\u547d\u4ee4\u884c\u53ca\u5176\u5e94\u7528\u7a0b\u5e8f\u6765\u4e86\u89e3\u6709\u5173\u64cd\u4f5c\u7cfb\u7edf\u548c\u8ba1\u7b97\u673a\u7684\u66f4\u591a\u4fe1\u606f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
\u4f17\u6240\u5468\u77e5\uff0cLinux \u547d\u4ee4\u901a\u5e38\u592a\u957f\uff0c\u800c\u8fc7\u957f\u4f1a\u589e\u52a0\u590d\u6742\u6027\u548c\u7406\u89e3\u95ee\u9898\u3002\u4f46\u603b\u6709\u4e00\u79cd\u65b9\u6cd5\u53ef\u4ee5\u7f29\u77ed\u60a8\u7684 Linux \u547d\u4ee4 […]<\/p>\n","protected":false},"author":370,"featured_media":233913,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-259855","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\/259855","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\/370"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=259855"}],"version-history":[{"count":2,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/259855\/revisions"}],"predecessor-version":[{"id":259858,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/259855\/revisions\/259858"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/233913"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=259855"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=259855"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=259855"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}