{"id":15,"date":"2019-03-05T12:27:13","date_gmt":"2019-03-05T04:27:13","guid":{"rendered":"http:\/\/www.linuxcool.com\/?p=15"},"modified":"2022-05-01T16:45:24","modified_gmt":"2022-05-01T08:45:24","slug":"cat","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/cat","title":{"rendered":"cat\u547d\u4ee4 – \u5728\u7ec8\u7aef\u8bbe\u5907\u4e0a\u663e\u793a\u6587\u4ef6\u5185\u5bb9"},"content":{"rendered":"\n

cat\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u5355\u8bcdconcatenate\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u67e5\u770b\u6587\u4ef6\u5185\u5bb9\u3002\u5728Linux\u7cfb\u7edf\u4e2d\u6709\u5f88\u591a\u7528\u4e8e\u67e5\u770b\u6587\u4ef6\u5185\u5bb9\u7684\u547d\u4ee4\uff0c\u4f8b\u5982more\u3001tail\u3001head\u2026\u2026\u7b49\u7b49\uff0c\u6bcf\u4e2a\u547d\u4ee4\u90fd\u6709\u5404\u81ea\u7684\u7279\u70b9\u3002cat\u547d\u4ee4\u9002\u5408\u67e5\u770b\u5185\u5bb9\u8f83\u5c11\u7684\u3001\u7eaf\u6587\u672c\u7684\u6587\u4ef6\u3002<\/p>\n\n\n\n

\u5bf9\u4e8e\u5185\u5bb9\u8f83\u591a\u7684\u6587\u4ef6\uff0c\u4f7f\u7528cat\u547d\u4ee4\u67e5\u770b\u540e\u4f1a\u5728\u5c4f\u5e55\u4e0a\u5feb\u901f\u6eda\u5c4f\uff0c\u7528\u6237\u5f80\u5f80\u770b\u4e0d\u6e05\u6240\u663e\u793a\u7684\u5177\u4f53\u5185\u5bb9\uff0c\u53ea\u597d\u6309Ctrl+c\u952e\u4e2d\u65ad\u547d\u4ee4\u7684\u6267\u884c\uff0c\u6240\u4ee5\u5bf9\u4e8e\u5927\u6587\u4ef6\uff0c\u5e72\u8106\u7528more\u547d\u4ee4\u5427~<\/p>\n\n\n\n

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

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

-n <\/td>\u663e\u793a\u884c\u6570\uff08\u7a7a\u884c\u4e5f\u7f16\u53f7\uff09<\/td><\/tr>
-s<\/td>\u663e\u793a\u884c\u6570\uff08\u591a\u4e2a\u7a7a\u884c\u7b97\u4e00\u4e2a\u7f16\u53f7\uff09 <\/td><\/tr>
-b <\/td>\u663e\u793a\u884c\u6570\uff08\u7a7a\u884c\u4e0d\u7f16\u53f7\uff09 <\/td><\/tr>
-E<\/td>\u6bcf\u884c\u7ed3\u675f\u5904\u663e\u793a$\u7b26\u53f7
<\/td><\/tr>
-T<\/td>\u5c06TAB\u5b57\u7b26\u663e\u793a\u4e3a ^I\u7b26\u53f7 <\/td><\/tr>
-v<\/td> \u4f7f\u7528 ^ \u548c M- \u5f15\u7528\uff0c\u9664\u4e86 LFD \u548c TAB \u4e4b\u5916 <\/td><\/tr>
-e<\/td>\u7b49\u4ef7\u4e8e”-vE”\u7ec4\u5408<\/td><\/tr>
-t
<\/td>
\u7b49\u4ef7\u4e8e”-vT”\u7ec4\u5408<\/td><\/tr>
-A<\/td>\u7b49\u4ef7\u4e8e -vET\u7ec4\u5408<\/td><\/tr>
--help <\/td>\u663e\u793a\u5e2e\u52a9\u4fe1\u606f<\/td><\/tr>
--version <\/td>\u663e\u793a\u7248\u672c\u4fe1\u606f<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

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

\u67e5\u770b\u67d0\u4e2a\u6587\u4ef6\u7684\u5185\u5bb9\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# cat anaconda-ks.cfg<\/strong>\n#version=RHEL8\r\nignoredisk --only-use=sda\r\nautopart --type=lvm\r\n# Partition clearing information\r\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

\u67e5\u770b\u67d0\u4e2a\u6587\u4ef6\u7684\u5185\u5bb9\uff0c\u5e76\u663e\u793a\u884c\u53f7\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# cat -n anaconda-ks.cfg<\/strong>\r\n     1\t#version=RHEL8\r\n     2\tignoredisk --only-use=sda\r\n     3\tautopart --type=lvm\r\n     4\t# Partition clearing information\r\n     5\tclearpart --none --initlabel\r\n     6\t# Use graphical install\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026\r<\/pre>\n\n\n\n

\u642d\u914d\u7a7a\u8bbe\u5907\u6587\u4ef6\u548c\u8f93\u51fa\u91cd\u5b9a\u5411\u64cd\u4f5c\u7b26\uff0c\u5c06\u67d0\u4e2a\u6587\u4ef6\u5185\u5bb9\u6e05\u7a7a\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# cat \/dev\/null > anacond<\/strong>a-ks.cfg \n[root@linuxcool ~]# cat anaconda-ks.cfg <\/strong>\n[root@linuxcool ~]# <\/pre>\n\n\n\n

\u6301\u7eed\u5199\u5165\u6587\u4ef6\u5185\u5bb9\uff0c\u76f4\u5230\u78b0\u5230EOF\u7b26\u540e\u624d\u4f1a\u7ed3\u675f\u5e76\u4fdd\u5b58\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# cat > anaconda-ks.cfg << EOF<\/strong>\n> Hello,World<\/strong>\n> Linux!~<\/strong>\n> EOF<\/strong>\n[root@linuxcool ~]# cat anaconda-ks.cfg <\/strong>\nHello,World\nLinux!~<\/pre>\n\n\n\n

\u642d\u914d\u8f93\u51fa\u91cd\u5b9a\u5411\u64cd\u4f5c\u7b26\uff0c\u5c06\u5149\u76d8\u8bbe\u5907\u5236\u4f5c\u6210\u955c\u50cf\u6587\u4ef6\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# cat \/dev\/cdrom > rhel.iso<\/strong>\n[root@linuxcool ~]# ls rhel.iso  -lh<\/strong>\r\n-rw-r--r--. 1 root root 6.7G May  2 00:43 rhel.iso\r\n[root@linuxcool ~]# file rhel.iso <\/strong>\r\nrhel.iso: DOS\/MBR boot sector; partition 2 : ID=0xef, start-CHS (0x3ff,254,63), end-CHS (0x3ff,254,63), startsector 23128, 19888 sectors\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

cat\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u5355\u8bcdconcatenate\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u67e5\u770b\u6587\u4ef6\u5185\u5bb9\u3002\u5728Linux\u7cfb\u7edf\u4e2d\u6709\u5f88\u591a\u7528\u4e8e\u67e5 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/15"}],"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=15"}],"version-history":[{"count":36,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/15\/revisions"}],"predecessor-version":[{"id":9070,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/15\/revisions\/9070"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=15"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=15"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=15"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}