{"id":6872,"date":"2020-04-19T21:56:04","date_gmt":"2020-04-19T13:56:04","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=6872"},"modified":"2020-04-29T08:00:45","modified_gmt":"2020-04-29T00:00:45","slug":"red","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/red","title":{"rendered":"red\u547d\u4ee4 – \u6307\u5b9a\u6587\u4ef6\u7f16\u8f91\u5668"},"content":{"rendered":"\n

red\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u53ef\u4ee5\u901a\u8fc7\u8bfb\u53d6\u6307\u5b9a\u6587\u4ef6\u8fdb\u884c\u7f16\u8f91\uff0cred\u547d\u4ee4\u5bf9\u8f93\u5165\u6587\u4ef6\u7684\u5185\u5bb9\u6309\u884c\u8fdb\u884c\u7f16\u8f91\uff0c\u662f\u884c\u7f16\u8f91\u5668\u548c\u6587\u672c\u7f16\u8f91\u5668\u3002<\/p>\n\n\n\n

red\u547d\u4ee4\u4e0d\u4ec5\u53ef\u4ee5\u5728bash\u4e2d\u4f7f\u7528\uff0c\u4e5f\u53ef\u4ee5\u5728\u811a\u672c\u6587\u4ef6\u4e2d\u4f7f\u7528\uff0cred\u547d\u4ee4\u53ef\u4ee5\u5c06\u6574\u4e2a\u6587\u4ef6\u7684\u5185\u5bb9\u8bfb\u5165\u81ea\u5df1\u7684\u7f13\u51b2\u533a\uff0c\u5bf9\u8be5\u526f\u672c\u6267\u884c\u6307\u5b9a\u7684\u64cd\u4f5c\uff0c\u5e76\u53ef\u9009\u5730\u5c06\u7f13\u51b2\u533a\u5199\u5230\u78c1\u76d8\u3002<\/p>\n\n\n\n

\u6ce8\u610f\uff0c\u4f7f\u7528red\u547d\u4ee4\u7f16\u8f91\u7684\u65f6\u5019\u662f\u770b\u4e0d\u5230\u6587\u4ef6\u5185\u5bb9\u7684\uff0c\u4e00\u5b9a\u8981\u4ed4\u7ec6\u68c0\u67e5\u8f93\u5165\u7684\u5185\u5bb9\u4ee5\u4fdd\u8bc1\u5176\u6b63\u786e\u6027\uff0c\u907f\u514d\u53cd\u590d\u5f80\u8fd4\u4e8e\u7f16\u8f91\u72b6\u6001\u548c\u547d\u4ee4\u884c\u72b6\u6001\u4e4b\u95f4\uff0c\u90a3\u6837\u4f1a\u6d6a\u8d39\u5927\u91cf\u7684\u65f6\u95f4\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f:<\/strong> red[\u53c2\u6570] [\u6587\u4ef6]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

a<\/td>\u5728\u6587\u4ef6\u7684\u672b\u5c3e\u6dfb\u52a0\u65b0\u5185\u5bb9<\/td><\/tr>
i<\/td>\u5728\u6587\u4ef6\u7684\u6700\u540e\u4e00\u884c\u4e4b\u524d\u63d2\u5165\u65b0\u5185\u5bb9<\/td><\/tr>
o<\/td>\u628a\u6587\u4ef6\u8f93\u5165\u7684\u6700\u540e\u4e00\u884c\u66ff\u6362\u6210\u65b0\u5185\u5bb9<\/td><\/tr>
.<\/td>\u9000\u51fa\u7f16\u8f91\u6587\u4ef6\u6a21\u5f0f\u8fdb\u5165\u547d\u4ee4\u884c\u6a21\u5f0f\uff08\u5e76\u6ca1\u6709\u9000\u51fa\u7f16\u8f91\u5668\uff09<\/td><\/tr>
w<\/td>\u4fdd\u5b58\u6587\u4ef6<\/td><\/tr>
q<\/td>\u771f\u6b63\u9000\u51fa\u7f16\u8f91\u5668<\/td><\/tr>
-G<\/td>\u8fd0\u884c\u5728\u517c\u5bb9\u6a21\u5f0f<\/td><\/tr>
-l<\/td>\u5982\u679c\u547d\u4ee4\u5931\u8d25\uff0c\u4f7f\u75280\u72b6\u6001\u9000\u51fa<\/td><\/tr>
-p<\u5b57\u7b26\u4e32><\/td>\u4f7f\u7528\u6307\u5b9a\u5b57\u7b26\u4e32\u4f5c\u4e3a\u4ea4\u4e92\u63d0\u793a<\/td><\/tr>
-s<\/td>\u6291\u5236\u8bca\u65ad<\/td><\/tr>
-v<\/td>\u663e\u793a\u8be6\u7ec6\u4fe1\u606f<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u8bfb\u53d6\u6587\u4ef6\u8fdb\u884c\u7f16\u8f91\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# red linuxcool.txt<\/pre>\n\n\n\n

\u521b\u5efa\u4e00\u4e2a\u65b0\u6587\u4ef6\u4fdd\u5b58\u5e76\u67e5\u770b\u5185\u5bb9\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# red\na\nProbably the best Linux command site\n.\nw linuxcool.txt\n37\nq\n[root@linuxcool ~]# cat linuxcool.txt\nProbably the best Linux command site<\/pre>\n\n\n\n

\u5728\u6587\u4ef6\u7684\u6700\u540e\u4e00\u884c\u4e4b\u524d\u63d2\u5165\u65b0\u5185\u5bb9\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# red linuxcool.txt\n37\n-i\nThis is the inserted content text\n.\nw\n71\nq\n[root@linuxcool ~]# cat linuxcool.txt\nThis is the inserted content text\nProbably the best Linux command site<\/pre>\n","protected":false},"excerpt":{"rendered":"

red\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u53ef\u4ee5\u901a\u8fc7\u8bfb\u53d6\u6307\u5b9a\u6587\u4ef6\u8fdb\u884c\u7f16\u8f91\uff0cred\u547d\u4ee4\u5bf9\u8f93\u5165\u6587\u4ef6\u7684\u5185\u5bb9\u6309\u884c\u8fdb\u884c\u7f16\u8f91\uff0c\u662f\u884c\u7f16\u8f91\u5668\u548c\u6587\u672c\u7f16\u8f91\u5668 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6872"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=6872"}],"version-history":[{"count":7,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6872\/revisions"}],"predecessor-version":[{"id":7269,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6872\/revisions\/7269"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=6872"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=6872"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=6872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}