{"id":1312,"date":"2019-04-28T23:41:21","date_gmt":"2019-04-28T15:41:21","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=1312"},"modified":"2022-05-27T13:09:44","modified_gmt":"2022-05-27T05:09:44","slug":"tr","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/tr","title":{"rendered":"tr\u547d\u4ee4 – \u5b57\u7b26\u8f6c\u6362\u5de5\u5177"},"content":{"rendered":"\n

tr\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u5355\u8bcdtransform\u7684\u7f29\u5199\uff0c\u4e2d\u6587\u8bd1\u4e3a\u8f6c\u6362\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u5b57\u7b26\u8f6c\u6362\u3002tr\u547d\u4ee4\u662f\u4e00\u6b3e\u6279\u91cf\u5b57\u7b26\u8f6c\u6362\u3001\u538b\u7f29\u3001\u5220\u9664\u7684\u6587\u672c\u5de5\u5177\uff0c\u4f46\u4ec5\u80fd\u4ece\u6807\u51c6\u8f93\u5165\u4e2d\u8bfb\u53d6\u6587\u672c\u5185\u5bb9\uff0c\u9700\u8981\u4e0e\u7ba1\u9053\u7b26\u6216\u8f93\u5165\u91cd\u5b9a\u5411\u64cd\u4f5c\u7b26\u642d\u914d\u4f7f\u7528\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>tr [\u53c2\u6570] \u5b57\u7b26\u4e321 \u5b57\u7b26\u4e322<\/p>\n\n\n\n

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

-c<\/td>\u53cd\u9009\u5b57\u7b26\u4e321\u7684\u8865\u96c6\uff08\u53d6\u53cd\uff09<\/td><\/tr>
-d<\/td>\u5220\u9664\u5b57\u7b26\u4e321\u4e2d\u51fa\u73b0\u7684\u6240\u6709\u5b57\u7b26<\/td><\/tr>
-s<\/td>\u5220\u9664\u6240\u6709\u91cd\u590d\u51fa\u73b0\u7684\u5b57\u7b26\u5e8f\u5217<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

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

\u5c06\u6307\u5b9a\u6587\u4ef6\u4e2d\u7684\u5c0f\u5199\u5b57\u6bcd\u8f6c\u6362\u6210\u5927\u5199\u5b57\u6bcd\u540e\u8f93\u51fa\u5185\u5bb9\u5230\u7ec8\u7aef\u754c\u9762\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# tr [a-z] [A-Z] < anaconda-ks.cfg <\/strong>\n#VERSION=RHEL8\nIGNOREDISK --ONLY-USE=SDA\nAUTOPART --TYPE=LVM\n# PARTITION CLEARING INFORMATION\nCLEARPART --ALL --INITLABEL --DRIVES=SDA\n# USE GRAPHICAL INSTALL\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026<\/pre>\n\n\n\n

\u5220\u9664\u6307\u5b9a\u6587\u4ef6\u4e2d\u6240\u6709\u7684\u6570\u5b57\u540e\u8f93\u51fa\u5185\u5bb9\u5230\u7ec8\u7aef\u754c\u9762\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# tr -d [0-9] < anaconda-ks.cfg<\/strong>\n#version=RHEL\nignoredisk --only-use=sda\nautopart --type=lvm\n# Partition clearing information\nclearpart --all --initlabel --drives=sda\n# Use graphical install\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026<\/pre>\n\n\n\n

\u5c06\u6307\u5b9a\u6587\u4ef6\u4e2d\u7684\u591a\u4e2a\u76f8\u90bb\u7a7a\u884c\u53bb\u91cd\u540e\u8f93\u51fa\u5185\u5bb9\u5230\u7ec8\u7aef\u754c\u9762\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# tr -s \"[\\n]\" < anaconda-ks.cfg <\/strong>\r\n#version=RHEL8\r\nignoredisk --only-use=sda\r\nautopart --type=lvm\r\n# Partition clearing information\r\nclearpart --all --initlabel --drives=sda\r\n# Use graphical install\r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026<\/pre>\n","protected":false},"excerpt":{"rendered":"

tr\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u5355\u8bcdtransform\u7684\u7f29\u5199\uff0c\u4e2d\u6587\u8bd1\u4e3a\u8f6c\u6362\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u5b57\u7b26\u8f6c\u6362\u3002tr\u547d\u4ee4\u662f\u4e00\u6b3e\u6279\u91cf\u5b57\u7b26\u8f6c\u6362 […]<\/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\/1312"}],"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=1312"}],"version-history":[{"count":13,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/1312\/revisions"}],"predecessor-version":[{"id":10115,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/1312\/revisions\/10115"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=1312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=1312"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=1312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}