6.Linux文本处理(6. Linux text processing)

1.cat  

(1)cat 是 concatenate(连接)的简写。

(2)功能:显示文本文件的内容;也可以把几个文件内容附加到另一个文件中,即连接合并文件

(3)用法:cat [选项] 文件名;cat 文件1 文件2 > 文件3

(4)适合显示不太长的文件

2.more

(1)可以分页显示文本文件的内容

(2)用法:more [选项] 文件名(more命令比较简单,一般不用什么选项)

3.head

4.less

5.tail

————————

1.cat

(1) Cat is short for concatenate.

(2) Function: display the content of text file; You can also attach the contents of several files to another file, that is, connect and merge files

(3) Usage: cat [options] file name; Cat file1 File2 & gt; Document 3

(4) Suitable for displaying files that are not too long

2.more

(1) The contents of the text file can be displayed in pages

(2) Usage: more [options] file name (the more command is relatively simple, usually without any options)

3.head

4.less

5.tail