{"id":52344,"date":"2024-12-03T13:59:19","date_gmt":"2024-12-03T05:59:19","guid":{"rendered":"https:\/\/fwq.ai\/blog\/52344\/"},"modified":"2024-12-03T13:59:19","modified_gmt":"2024-12-03T05:59:19","slug":"linux-rc%e6%8c%87%e7%9a%84%e6%98%af%e4%bb%80%e4%b9%88%e6%84%8f%e6%80%9d","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/52344\/","title":{"rendered":"linux rc\u6307\u7684\u662f\u4ec0\u4e48\u610f\u601d"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>linux rc\u6307\u7684\u662f\u4ec0\u4e48\u610f\u601d<\/h1>\n<p>\u76ee\u524d\u7c73\u4e91\u4e0a\u5df2\u7ecf\u6709\u5f88\u591a\u5173\u4e8e<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u6587\u7ae0<\/span>\u7684\u6587\u7ae0\u4e86\uff0c\u81ea\u5df1\u5728\u521d\u6b21\u9605\u8bfb\u8fd9\u4e9b\u6587\u7ae0\u4e2d\uff0c\u4e5f\u89c1\u8bc6\u5230\u4e86\u5f88\u591a\u5b66\u4e60\u601d\u8def\uff1b\u90a3\u4e48\u672c\u6587<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300alinux rc\u6307\u7684\u662f\u4ec0\u4e48\u610f\u601d\u300b<\/span>\uff0c\u4e5f\u5e0c\u671b\u80fd\u5e2e\u52a9\u5230\u5927\u5bb6\uff0c\u5982\u679c\u9605\u8bfb\u5b8c\u540e\u771f\u7684\u5bf9\u4f60\u5b66\u4e60<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u6587\u7ae0<\/span>\u6709\u5e2e\u52a9\uff0c\u6b22\u8fce\u52a8\u52a8\u624b\u6307\uff0c\u8bc4\u8bba\u7559\u8a00\u5e76\u5206\u4eab~<\/p>\n<\/p>\n<blockquote>\n<p>linux rc\u662fruncomm\u7684\u7f29\u5199\uff0c\u5373\u540d\u8bcd\u201crun command\u201d\uff08\u8fd0\u884c\u547d\u4ee4\uff09\u7684\u7b80\u5199\uff1brc\u662f\u4efb\u4f55\u811a\u672c\u7c7b\u6587\u4ef6\u7684\u540e\u7f00\uff0c\u8fd9\u4e9b\u811a\u672c\u901a\u5e38\u5728\u7a0b\u5e8f\u7684\u542f\u52a8\u9636\u6bb5\u88ab\u8c03\u7528\uff0c\u901a\u5e38\u662fLinux\u7cfb\u7edf\u542f\u52a8\u65f6\uff0c\u6bd4\u5982\u201c\/etc\/rc\u201d\u662fLinux\u542f\u52a8\u7684\u4e3b\u811a\u672c\uff0c\u800c\u201c.bashrc\u201d\u662f\u5f53Linux\u7684bash shell\u542f\u52a8\u540e\u6240\u8fd0\u884c\u7684\u811a\u672c\u3002<\/p>\n<\/blockquote>\n<p>Linux\u4e2drc\u7684\u542b\u4e49<\/p>\n<p>\u5728Linux\u4e2d\uff0c\u6700\u4e3a\u5e38\u7528\u7684\u7f29\u7565\u8bed\u4e5f\u8bb8\u662f\u201crc\u201d\uff0c\u5b83\u662f\u201cruncomm\u201d\u7684\u7f29\u5199\u2015\u2015\u5373\u540d\u8bcd\u201crun command\u201d(\u8fd0\u884c\u547d\u4ee4)\u7684\u7b80\u5199\u3002rc\u201d\u662f\u4efb\u4f55\u811a\u672c\u7c7b\u6587\u4ef6\u7684\u540e\u7f00\uff0c\u8fd9\u4e9b\u811a\u672c\u901a\u5e38\u5728\u7a0b\u5e8f\u7684\u542f\u52a8\u9636\u6bb5\u88ab\u8c03\u7528\uff0c\u901a\u5e38\u662fLinux\u7cfb\u7edf\u542f\u52a8\u65f6\u3002\u5982\/etc\/rc\uff08\u8fde\u63a5\u5230\/etc\/rc.d\/rc\uff09\u662fLinux\u542f\u52a8\u7684\u4e3b\u811a\u672c\uff0c\u800c.bashrc\u662f\u5f53Linux\u7684bash shell\u542f\u52a8\u540e\u6240\u8fd0\u884c\u7684\u811a\u672c\u3002<\/p>\n<p>.bashrc\u7684\u524d\u7f00\u201c.\u201d\u662f\u4e00\u4e2a\u547d\u540d\u6807\u51c6\uff0c\u5b83\u88ab\u8bbe\u8ba1\u7528\u6765\u5728\u7528\u6237\u6587\u4ef6\u4e2d\u9690\u85cf\u90a3\u4e9b\u7528\u6237\u6307\u5b9a\u7684\u7279\u6b8a\u6587\u4ef6;\u201cls\u201d\u547d\u4ee4\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u4e0d\u4f1a\u5217\u51fa\u6b64\u7c7b\u6587\u4ef6\uff0c\u201crm\u201d\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u4e5f\u4e0d\u4f1a\u5220\u9664\u5b83\u4eec\u3002\u8bb8\u591a\u7a0b\u5e8f\u5728\u542f\u52a8\u65f6\uff0c\u90fd\u9700\u8981\u201crc\u201d\u540e\u7f00\u7684\u521d\u59cb\u6587\u4ef6\u6216\u914d\u7f6e\u6587\u4ef6\uff0c\u8fd9\u5bf9\u4e8eUnix\u7684\u6587\u4ef6\u7cfb\u7edf\u89c6\u56fe\u6765\u8bf4\uff0c\u6ca1\u6709\u4ec0\u4e48\u795e\u79d8\u7684\u3002<\/p>\n<pre>[root@minimal&nbsp;test-rm]#&nbsp;pwd\n\/home\/huage\/test-rm\n[root@minimal&nbsp;test-rm]#&nbsp;ls&nbsp;-Al\ntotal&nbsp;0\n-rw-r--r--.&nbsp;1&nbsp;root&nbsp;root&nbsp;0&nbsp;Apr&nbsp;&nbsp;2&nbsp;11:50&nbsp;001\n-rw-r--r--.&nbsp;1&nbsp;root&nbsp;root&nbsp;0&nbsp;Apr&nbsp;&nbsp;2&nbsp;11:50&nbsp;002\n-rw-r--r--.&nbsp;1&nbsp;root&nbsp;root&nbsp;0&nbsp;Apr&nbsp;&nbsp;2&nbsp;11:43&nbsp;.003\n-rw-r--r--.&nbsp;1&nbsp;root&nbsp;root&nbsp;0&nbsp;Apr&nbsp;&nbsp;2&nbsp;11:43&nbsp;.004\n[root@minimal&nbsp;test-rm]#&nbsp;rm&nbsp;-rf&nbsp;*\n[root@minimal&nbsp;test-rm]#&nbsp;ls&nbsp;-Al\ntotal&nbsp;0\n-rw-r--r--.&nbsp;1&nbsp;root&nbsp;root&nbsp;0&nbsp;Apr&nbsp;&nbsp;2&nbsp;11:43&nbsp;.003\n-rw-r--r--.&nbsp;1&nbsp;root&nbsp;root&nbsp;0&nbsp;Apr&nbsp;&nbsp;2&nbsp;11:43&nbsp;.004<\/pre>\n<p>&#8220;rc&#8221; (\u50cf\u662f &#8220;.cshrc&#8221; \u6216 &#8220;\/etc\/rc&#8221; \u4e2d\u7684 rc \u8fd9\u4e24\u4e2a\u5b57\u6bcd) = &#8220;RunCom&#8221;\u3000<\/p>\n<p>&#8220;rc&#8221; \u662f\u53d6\u81ea &#8220;runcom&#8221;, \u6765\u81ea\u9ebb\u7701\u7406\u5de5\u5b66\u9662\u5728 1965 \u5e74\u53d1\u5c55\u7684 CTSS\u7cfb\u7edf\u3002\u76f8\u5173\u6587\u732e\u66fe\u8bb0\u8f7d\u8fd9\u4e00\u6bb5\u8bdd\uff1a&#8221;\u5177\u6709\u4ece\u6863\u6848\u4e2d\u53d6\u51fa\u4e00\u7cfb\u5217\u547d\u4ee4\u6765\u6267\u884c\u7684\u529f\u80fd\uff1b\u8fd9\u79f0\u4e3a &#8220;run commands&#8221; \u53c8\u79f0\u4e3a &#8220;runcom&#8221;\uff0c\u800c\u8fd9\u79cd\u6863\u6848\u53c8\u79f0\u4e3a\u4e00\u4e2a runcom (a runcom)\u3002&#8221;<\/p>\n<pre>&nbsp;awk&nbsp;=&nbsp;\"Aho&nbsp;Weinberger&nbsp;and&nbsp;Kernighan\"&nbsp;\nThis&nbsp;language&nbsp;was&nbsp;named&nbsp;by&nbsp;its&nbsp;authors,&nbsp;Al&nbsp;Aho,&nbsp;Peter&nbsp;Weinberger&nbsp;and&nbsp;Brian&nbsp;Kernighan.&nbsp;\ngrep&nbsp;=&nbsp;\"Global&nbsp;Regular&nbsp;Expression&nbsp;Print\"&nbsp;\ngrep&nbsp;comes&nbsp;from&nbsp;the&nbsp;ed&nbsp;command&nbsp;to&nbsp;print&nbsp;all&nbsp;lines&nbsp;matching&nbsp;a&nbsp;certain&nbsp;pattern&nbsp;g\/re\/p&nbsp;where&nbsp;\"re\"&nbsp;is&nbsp;a&nbsp;\"regular&nbsp;expression\".\n&nbsp;\n&nbsp;&nbsp;rc&nbsp;(as&nbsp;in&nbsp;\".cshrc\"&nbsp;or&nbsp;\"\/etc\/rc\")&nbsp;=&nbsp;\"RunCom\"&nbsp;\n\"rc\"&nbsp;derives&nbsp;from&nbsp;\"runcom\",&nbsp;from&nbsp;the&nbsp;MIT&nbsp;CTSS&nbsp;system,&nbsp;ca.&nbsp;1965.&nbsp;'There&nbsp;was&nbsp;a&nbsp;facility&nbsp;that&nbsp;would&nbsp;execute&nbsp;a&nbsp;bunch&nbsp;of&nbsp;commands&nbsp;stored&nbsp;in&nbsp;a&nbsp;file;&nbsp;it&nbsp;was&nbsp;called&nbsp;\"runcom\"&nbsp;for&nbsp;\"run&nbsp;commands\",&nbsp;and&nbsp;the&nbsp;file&nbsp;began&nbsp;to&nbsp;be&nbsp;called&nbsp;\"a&nbsp;runcom.\"&nbsp;\"rc\"&nbsp;in&nbsp;Unix&nbsp;is&nbsp;a&nbsp;fossil&nbsp;from&nbsp;that&nbsp;usage.'&nbsp;\nPerl&nbsp;=&nbsp;\"Practical&nbsp;Extraction&nbsp;and&nbsp;Report&nbsp;Language\"&nbsp;\nPerl&nbsp;=&nbsp;\"Pathologically&nbsp;Eclectic&nbsp;Rubbish&nbsp;Lister\"&nbsp;\nThe&nbsp;Perl&nbsp;language&nbsp;is&nbsp;Larry&nbsp;Wall's&nbsp;highly&nbsp;popular&nbsp;freely-available&nbsp;completely&nbsp;portable&nbsp;text,&nbsp;process,&nbsp;and&nbsp;file&nbsp;manipulation&nbsp;tool&nbsp;that&nbsp;bridges&nbsp;the&nbsp;gap&nbsp;between&nbsp;shell&nbsp;and&nbsp;C&nbsp;programming&nbsp;(or&nbsp;between&nbsp;doing&nbsp;it&nbsp;on&nbsp;the&nbsp;command&nbsp;line&nbsp;and&nbsp;pulling&nbsp;your&nbsp;hair&nbsp;out).&nbsp;For&nbsp;further&nbsp;information,&nbsp;see&nbsp;the&nbsp;Usenet&nbsp;newsgroup&nbsp;comp.lang.perl.misc.<\/pre>\n<p>\u6587\u4e2d\u5173\u4e8eLinux\u7684\u77e5\u8bc6\u4ecb\u7ecd\uff0c\u5e0c\u671b\u5bf9\u4f60\u7684\u5b66\u4e60\u6709\u6240\u5e2e\u52a9\uff01\u82e5\u662f\u53d7\u76ca\u532a\u6d45\uff0c\u90a3\u5c31\u52a8\u52a8\u9f20\u6807\u6536\u85cf\u8fd9\u7bc7\u300alinux rc\u6307\u7684\u662f\u4ec0\u4e48\u610f\u601d\u300b\u6587\u7ae0\u5427\uff0c\u4e5f\u53ef\u5173\u6ce8\u7c73\u4e91\u516c\u4f17\u53f7\u4e86\u89e3\u76f8\u5173\u6280\u672f\u6587\u7ae0\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>linux rc\u6307\u7684\u662f\u4ec0\u4e48\u610f\u601d \u76ee\u524d\u7c73\u4e91\u4e0a\u5df2\u7ecf\u6709\u5f88\u591a\u5173\u4e8e\u6587\u7ae0\u7684\u6587\u7ae0\u4e86\uff0c\u81ea\u5df1\u5728\u521d\u6b21\u9605\u8bfb\u8fd9\u4e9b\u6587\u7ae0\u4e2d\uff0c\u4e5f\u89c1\u8bc6\u5230\u4e86\u5f88\u591a\u5b66\u4e60\u601d\u8def\uff1b\u90a3\u4e48\u672c\u6587\u300alinux rc\u6307\u7684\u662f\u4ec0\u4e48\u610f\u601d\u300b\uff0c\u4e5f\u5e0c\u671b\u80fd\u5e2e\u52a9\u5230\u5927\u5bb6\uff0c\u5982\u679c\u9605\u8bfb\u5b8c\u540e\u771f\u7684\u5bf9\u4f60\u5b66\u4e60\u6587\u7ae0\u6709\u5e2e\u52a9\uff0c\u6b22\u8fce\u52a8\u52a8\u624b\u6307\uff0c\u8bc4\u8bba\u7559\u8a00\u5e76\u5206\u4eab~ linux rc\u662fruncomm\u7684\u7f29\u5199\uff0c\u5373\u540d\u8bcd\u201crun command\u201d\uff08\u8fd0\u884c\u547d\u4ee4\uff09\u7684\u7b80\u5199\uff1brc\u662f\u4efb\u4f55\u811a\u672c\u7c7b\u6587\u4ef6\u7684\u540e\u7f00\uff0c\u8fd9\u4e9b\u811a\u672c\u901a\u5e38\u5728\u7a0b\u5e8f\u7684\u542f\u52a8\u9636\u6bb5\u88ab\u8c03\u7528\uff0c\u901a\u5e38\u662fLinux\u7cfb\u7edf\u542f\u52a8\u65f6\uff0c\u6bd4\u5982\u201c\/etc\/rc\u201d\u662fLinux\u542f\u52a8\u7684\u4e3b\u811a\u672c\uff0c\u800c\u201c.bashrc\u201d\u662f\u5f53Linux\u7684bash shell\u542f\u52a8\u540e\u6240\u8fd0\u884c\u7684\u811a\u672c\u3002 Linux\u4e2drc\u7684\u542b\u4e49 \u5728Linux\u4e2d\uff0c\u6700\u4e3a\u5e38\u7528\u7684\u7f29\u7565\u8bed\u4e5f\u8bb8\u662f\u201crc\u201d\uff0c\u5b83\u662f\u201cruncomm\u201d\u7684\u7f29\u5199\u2015\u2015\u5373\u540d\u8bcd\u201crun command\u201d(\u8fd0\u884c\u547d\u4ee4)\u7684\u7b80\u5199\u3002rc\u201d\u662f\u4efb\u4f55\u811a\u672c\u7c7b\u6587\u4ef6\u7684\u540e\u7f00\uff0c\u8fd9\u4e9b\u811a\u672c\u901a\u5e38\u5728\u7a0b\u5e8f\u7684\u542f\u52a8\u9636\u6bb5\u88ab\u8c03\u7528\uff0c\u901a\u5e38\u662fLinux\u7cfb\u7edf\u542f\u52a8\u65f6\u3002\u5982\/etc\/rc\uff08\u8fde\u63a5\u5230\/etc\/rc.d\/rc\uff09\u662fLinux\u542f\u52a8\u7684\u4e3b\u811a\u672c\uff0c\u800c.bashrc\u662f\u5f53Linux\u7684bash shell\u542f\u52a8\u540e\u6240\u8fd0\u884c\u7684\u811a\u672c\u3002 .bashrc\u7684\u524d\u7f00\u201c.\u201d\u662f\u4e00\u4e2a\u547d\u540d\u6807\u51c6\uff0c\u5b83\u88ab\u8bbe\u8ba1\u7528\u6765\u5728\u7528\u6237\u6587\u4ef6\u4e2d\u9690\u85cf\u90a3\u4e9b\u7528\u6237\u6307\u5b9a\u7684\u7279\u6b8a\u6587\u4ef6;\u201cls\u201d\u547d\u4ee4\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u4e0d\u4f1a\u5217\u51fa\u6b64\u7c7b\u6587\u4ef6\uff0c\u201crm\u201d\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u4e5f\u4e0d\u4f1a\u5220\u9664\u5b83\u4eec\u3002\u8bb8\u591a\u7a0b\u5e8f\u5728\u542f\u52a8\u65f6\uff0c\u90fd\u9700\u8981\u201crc\u201d\u540e\u7f00\u7684\u521d\u59cb\u6587\u4ef6\u6216\u914d\u7f6e\u6587\u4ef6\uff0c\u8fd9\u5bf9\u4e8eUnix\u7684\u6587\u4ef6\u7cfb\u7edf\u89c6\u56fe\u6765\u8bf4\uff0c\u6ca1\u6709\u4ec0\u4e48\u795e\u79d8\u7684\u3002 [root@minimal&nbsp;test-rm]#&nbsp;pwd \/home\/huage\/test-rm [root@minimal&nbsp;test-rm]#&nbsp;ls&nbsp;-Al total&nbsp;0 -rw-r&#8211;r&#8211;.&nbsp;1&nbsp;root&nbsp;root&nbsp;0&nbsp;Apr&nbsp;&nbsp;2&nbsp;11:50&nbsp;001 -rw-r&#8211;r&#8211;.&nbsp;1&nbsp;root&nbsp;root&nbsp;0&nbsp;Apr&nbsp;&nbsp;2&nbsp;11:50&nbsp;002 -rw-r&#8211;r&#8211;.&nbsp;1&nbsp;root&nbsp;root&nbsp;0&nbsp;Apr&nbsp;&nbsp;2&nbsp;11:43&nbsp;.003 -rw-r&#8211;r&#8211;.&nbsp;1&nbsp;root&nbsp;root&nbsp;0&nbsp;Apr&nbsp;&nbsp;2&nbsp;11:43&nbsp;.004 [root@minimal&nbsp;test-rm]#&nbsp;rm&nbsp;-rf&nbsp;* [root@minimal&nbsp;test-rm]#&nbsp;ls&nbsp;-Al total&nbsp;0 -rw-r&#8211;r&#8211;.&nbsp;1&nbsp;root&nbsp;root&nbsp;0&nbsp;Apr&nbsp;&nbsp;2&nbsp;11:43&nbsp;.003 -rw-r&#8211;r&#8211;.&nbsp;1&nbsp;root&nbsp;root&nbsp;0&nbsp;Apr&nbsp;&nbsp;2&nbsp;11:43&nbsp;.004 &#8220;rc&#8221; (\u50cf\u662f &#8220;.cshrc&#8221; \u6216 &#8220;\/etc\/rc&#8221; \u4e2d\u7684 rc \u8fd9\u4e24\u4e2a\u5b57\u6bcd) = &#8220;RunCom&#8221;\u3000 &#8220;rc&#8221; \u662f\u53d6\u81ea &#8220;runcom&#8221;, \u6765\u81ea\u9ebb\u7701\u7406\u5de5\u5b66\u9662\u5728 1965 \u5e74\u53d1\u5c55\u7684 CTSS\u7cfb\u7edf\u3002\u76f8\u5173\u6587\u732e\u66fe\u8bb0\u8f7d\u8fd9\u4e00\u6bb5\u8bdd\uff1a&#8221;\u5177\u6709\u4ece\u6863\u6848\u4e2d\u53d6\u51fa\u4e00\u7cfb\u5217\u547d\u4ee4\u6765\u6267\u884c\u7684\u529f\u80fd\uff1b\u8fd9\u79f0\u4e3a &#8220;run commands&#8221; \u53c8\u79f0\u4e3a &#8220;runcom&#8221;\uff0c\u800c\u8fd9\u79cd\u6863\u6848\u53c8\u79f0\u4e3a\u4e00\u4e2a runcom (a runcom)\u3002&#8221; &nbsp;awk&nbsp;=&nbsp;&#8220;Aho&nbsp;Weinberger&nbsp;and&nbsp;Kernighan&#8221;&nbsp; This&nbsp;language&nbsp;was&nbsp;named&nbsp;by&nbsp;its&nbsp;authors,&nbsp;Al&nbsp;Aho,&nbsp;Peter&nbsp;Weinberger&nbsp;and&nbsp;Brian&nbsp;Kernighan.&nbsp; grep&nbsp;=&nbsp;&#8220;Global&nbsp;Regular&nbsp;Expression&nbsp;Print&#8221;&nbsp; grep&nbsp;comes&nbsp;from&nbsp;the&nbsp;ed&nbsp;command&nbsp;to&nbsp;print&nbsp;all&nbsp;lines&nbsp;matching&nbsp;a&nbsp;certain&nbsp;pattern&nbsp;g\/re\/p&nbsp;where&nbsp;&#8220;re&#8221;&nbsp;is&nbsp;a&nbsp;&#8220;regular&nbsp;expression&#8221;. &nbsp; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-52344","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/52344","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=52344"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/52344\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=52344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=52344"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=52344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}