{"id":289452,"date":"2024-01-14T05:07:23","date_gmt":"2024-01-13T21:07:23","guid":{"rendered":"https:\/\/lrxjmw.cn\/lhjxqscjcwjd.html"},"modified":"2024-01-14T05:07:23","modified_gmt":"2024-01-13T21:07:23","slug":"lhjxqscjcwjd","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/lhjxqscjcwjd.html","title":{"rendered":"Linux\u73af\u5883\u4e0b\uff0c\u8f7b\u677e\u521b\u5efactl\u6587\u4ef6\u7684\u56db\u79cd\u65b9\u6cd5"},"content":{"rendered":"

\u5728Linux<\/a>\u73af\u5883\u91cc\uff0c\u521b\u5efactl\u6587\u4ef6\u5c5e\u4e8e\u65e5\u5e38\u64cd\u4f5c\u4e4b\u4e3e\u3002\u63a5\u4e0b\u6765\u5173\u4e8e\u5982\u4f55\u5b8c\u6210\u8fd9\u4e00\u6b65\u9aa4\u7684\u8be6\u8ff0\uff0c\u671f\u5f85\u80fd\u7ed9\u60a8\u5e26\u6765\u5b9e\u9645\u4f5c\u7528\u3002<\/p>\n

1.\u4f7f\u7528vi\u7f16\u8f91\u5668\u751f\u6210ctl\u6587\u4ef6<\/b><\/p>\n

\u6211\u4eec\u53ef\u4ee5\u4fbf\u6377\u5730\u8fd0\u7528VI\u7f16\u8f91\u5668\u8fdb\u884c\u4eba\u5de5\u521b\u5efa\u4ee5\u53ca\u5bf9CTL\u6587\u4ef6\u7684\u64cd\u4f5c\u4fee\u6539\u3002\u90a3\u4e48\uff0c\u6765\u5f00\u542f\u60a8\u7684\u7ec8\u7aef\uff0c\u968f\u6211\u8f93\u5165\u5982\u4e0b\u7684\u6307\u4ee4\u5427\uff01<\/p>\n

```<\/p>\n

vi filename.ctl<\/p>\n

\u8bf7\u6309I\u952elinux \u751f\u6210ctl\u6587\u4ef6<\/strong>\uff0c\u8fdb\u5165\u7f16\u8f91\u72b6\u6001linux\u79fb\u690d\uff0c\u8f93\u5165\u6240\u9700\u6587\u672c\u4fe1\u606f\u3002\u968f\u540e\uff0c\u6309Esc\u89e3\u9664\u7f16\u8f91\uff0c\u8f93\u5165\u6307\u4ee4:wq \u4ee5\u5b58\u50a8\u5e76\u7ed3\u675f\u64cd\u4f5c\u3002<\/p>\n

2.\u4f7f\u7528echo\u547d\u4ee4<\/a>\u751f\u6210ctl\u6587\u4ef6<\/b><\/p>\n

\u5982\u679c\u60a8\u53ea\u9700\u521b\u5efa\u4e00\u4e2a\u7cbe\u7ec6\u7684ctl\u6587\u4ef6\uff0c\u90a3\u4e48\u63a8\u8350\u7528echo\u6307\u4ee4\u8fdb\u884c\u64cd\u4f5c\u54e6\uff01\u5728\u63a7\u5236\u53f0\u6572\u4e0b\u4ee5\u4e0b\u8fd9\u4e32\u6307\u4ee4\u5373\u53ef\u8f7b\u677e\u5b9e\u73b0\uff1a<\/p>\n

echo \"\u5185\u5bb9\"> filename.ctl<\/p>\n

\u8bf7\u628a\u60a8\u60f3\u8981\u4fdd\u5b58\u5230\u6587\u4ef6\u4e2d\u7684\u4fe1\u606f\u586b\u5199\u4e3a\"\u5185\u5bb9\"linux \u751f\u6210ctl\u6587\u4ef6<\/strong>\uff0c\u586b\u5199\u5b8c\u6bd5\u540e\u6309\u56de\u8f66\u952e\u5373\u53ef\u751f\u6210\u5bf9\u5e94\u7684ctl\u6587\u4ef6\u3002<\/p>\n

3.\u4f7f\u7528touch\u547d\u4ee4\u751f\u6210\u7a7a\u767d\u7684ctl\u6587\u4ef6<\/b><\/p>\n

linux \u751f\u6210ctl\u6587\u4ef6_\u751f\u6210\u6587\u4ef6\u5939\u76ee\u5f55bat_\u751f\u6210\u6587\u4ef6\u5939<\/p>\n

\u6709\u65f6\u4ec5\u9700\u6784\u5efa\u4e00\u4e2a\u7a7a\u7684ctl\u6587\u4ef6\uff0c\u60a8\u53ef\u5229\u7528touch\u547d\u4ee4\u8f7b\u677e\u5b9e\u73b0\u3002\u53ea\u9700\u5728\u7ec8\u7aef\u6267\u884c\u5982\u4e0b\u6307\u4ee4\uff1a<\/p>\n

touch filename.ctl<\/p>\n

\u8fd9\u6837\u5c31\u4f1a\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u751f\u6210\u4e00\u4e2a\u7a7a\u767d\u7684ctl\u6587\u4ef6\u3002<\/p>\n

4.\u4f7f\u7528cat\u547d\u4ee4\u751f\u6210ctl\u6587\u4ef6<\/b><\/p>\n

\u82e5\u60a8\u5df2\u6709\u73b0\u6210\u7684\u6587\u672c\u6863\uff0c\u60f3\u5c06\u5176\u4e2d\u4fe1\u606f\u590d\u5236\u81f3\u65b0ctl\u6587\u6863\uff0c\u8bf7\u4f7f\u7528\"cat\"\u6307\u4ee4\u54e6\u3002\u53ea\u9700\u5728\u7ec8\u7aef\u6572\u5165\u4e0b\u5217\u6307\u4ee4\u5c31\u597d\u5566~<\/p>\n

linux \u751f\u6210ctl\u6587\u4ef6_\u751f\u6210\u6587\u4ef6\u5939\u76ee\u5f55bat_\u751f\u6210\u6587\u4ef6\u5939<\/p>\n

\u5df2\u8bf7\u60a8\u5c06source file.txt\u6587\u4ef6\u7684\u5185\u5bb9\u5bfc\u51fa\u5230filename.ctl\u3002<\/p>\n

\u8bf7\u628a\"sourcefile.txt\"\u66ff\u6362\u6210\u4f60\u81ea\u5df1\u7684\u6587\u672c\u6587\u4ef6\u540d\uff0c\u7136\u540e\u70b9\u51fb\u56de\u8f66\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u5e2e\u60a8\u751f\u6210\u76f8\u5e94\u7684ctl\u6587\u4ef6\u4e86\u3002<\/p>\n

5.\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u751f\u6210ctl\u6587\u4ef6<\/b><\/p>\n

\u9664\u4e86Vi\u7f16\u8f91\u5668\u5916\uff0c\u60a8\u4e5f\u53ef\u4ee5\u9009\u62e9\u7528Nano\u6216Gedit\u7b49\u5176\u5b83\u6587\u672c\u7f16\u8f91\u5668\u6765\u521b\u5efaCTL\u6587\u4ef6\u3002\u53ea\u9700\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u76f8\u5e94\u7684\u547d\u4ee4\u5373\u53ef\uff1a<\/p>\n

nano filename.ctl<\/p>\n

\u7136\u540e\u6309\u7167\u7f16\u8f91\u5668\u7684\u5177\u4f53\u64cd\u4f5c\u6307\u5357\u6765\u521b\u5efa\u548c\u7f16\u8f91ctl\u6587\u4ef6\u3002<\/p>\n

6.\u4f7f\u7528\u811a\u672c\u751f\u6210ctl\u6587\u4ef6<\/b><\/p>\n

\u82e5\u662f\u9700\u8981\u5927\u89c4\u6a21\u521b\u5efactl\u6587\u4ef6\uff0c\u5efa\u8bae\u60a8\u52a8\u624b\u7f16\u5199\u4e00\u4e2a\u811a\u672c\u8fd0\u7528\u5faa\u73af\u8bed\u53e5\u4e0e\u91cd\u5b9a\u5411\u6307\u4ee4\uff0c\u4ee5\u6b64\u5b9e\u73b0\u81ea\u52a8\u751f\u6210\u7a0b\u5e8f\u3002<\/p>\n

7.\u4f7f\u7528\u6a21\u677f\u6587\u4ef6\u751f\u6210ctl\u6587\u4ef6<\/b><\/p>\n

\u4e3a\u4e86\u7ecf\u5e38\u5236\u4f5c\u76f8\u540c\u683c\u5f0f\u7684ctl\u6587\u4ef6\uff0c\u60a8\u53ef\u5148\u5efa\u7acb\u8be5\u7c7b\u578b\u7684\u6a21\u677f\u6587\u4ef6\u3002\u5f53\u9700\u8981\u65b0\u7684ctl\u6587\u4ef6\u65f6\uff0c\u53ea\u9700\u5c06\u5176\u590d\u5236\u5e76\u91cd\u65b0\u547d\u540d\uff0c\u518d\u8fd0\u7528vi\u7b49\u5de5\u5177\u5bf9\u65b0\u6587\u4ef6\u8fdb\u884c\u9002\u5f53\u66f4\u6539\u5373\u53ef\u3002<\/p>\n

8.\u4f7f\u7528GUI\u5de5\u5177\u751f\u6210ctl\u6587\u4ef6<\/b><\/p>\n

\u5373\u4f7f\u60a8\u5bf9\u547d\u4ee4\u884c\u4e0d\u5341\u5206\u7cbe\u901a\uff0c\u60a8\u4ecd\u7136\u6709\u8bb8\u591a\u4fbf\u6377\u7684\u65b9\u5f0f\u6765\u521b\u5efa\u6216\u4fee\u6539ctl\u6587\u4ef6\uff0c\u4f8b\u5982\u5728Ubuntu\u7cfb\u7edf<\/a>\u91cc\uff0c\u501f\u52a9\u6587\u672c\u7f16\u8f91\u5668\u6216IDE\u4e4b\u7c7b\u7684\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u5c31\u53ef\u5b8c\u6210\u6b64\u9879\u5de5\u4f5c\u3002<\/p>\n

9.\u67e5\u627e\u76f8\u5173\u8d44\u6599\u548c\u6559\u7a0b<\/b><\/p>\n

\u82e5\u4e0a\u8ff0\u529e\u6cd5\u4ecd\u4e0d\u80fd\u89e3\u51b3\u60a8\u7684\u95ee\u9898\uff0c\u6211\u4eec\u9f13\u52b1\u60a8\u5728\u7f51\u4e0a\u67e5\u627e\u6240\u9700\u4fe1\u606f\u53ca\u6307\u5357linux\u793e\u533a\uff0c\u4ee5\u627e\u5230\u66f4\u5951\u5408\u60a8\u9700\u6c42\u7684\u7b56\u7565\u4e0e\u5de5\u5177\u3002<\/p>\n

\u5e0c\u671b\u8fd9\u4e9b\u5c0f\u6280\u5de7\u80fd\u5e2e\u5230\u5404\u4f4d\u5728Linux\u7cfb\u7edf\u4e0b\u751f\u6210ctl\u6587\u4ef6\u7684\u670b\u53cb\u4eec\u3002\u5982\u6709\u5176\u4ed6\u7591\u95ee\uff0c\u6b22\u8fce\u968f\u65f6\u63d0\u95ee\u54e6\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5728Linux\u73af\u5883\u91cc\uff0c\u521b\u5efactl\u6587\u4ef6\u5c5e\u4e8e\u65e5\u5e38\u64cd\u4f5c\u4e4b\u4e3e\u3002\u4f7f\u7528touch\u547d\u4ee4\u751f\u6210\u7a7a\u767d\u7684ctl\u6587\u4ef6\u8fd9\u6837\u5c31\u4f1a\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u751f\u6210\u4e00\u4e2a\u7a7a\u767d\u7684ctl\u6587\u4ef6\u3002\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u751f\u6210ctl\u6587\u4ef6\u7136\u540e\u6309\u7167\u7f16\u8f91\u5668\u7684\u5177\u4f53\u64cd\u4f5c\u6307\u5357\u6765\u521b\u5efa\u548c\u7f16\u8f91ctl\u6587\u4ef6\u3002\u4f7f\u7528\u811a\u672c\u751f\u6210ctl\u6587\u4ef6\u4f7f\u7528GUI\u5de5\u5177\u751f\u6210ctl\u6587\u4ef6<\/p>\n","protected":false},"author":1,"featured_media":289453,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-289452","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/289452","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=289452"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/289452\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/289453"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=289452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=289452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=289452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}