cat 查看文本所有内容
1.查看文件内容
-n 添加行号
-b 空行不添加行号
-s 多空行只添加一个行号
cat file
cat -n file
2.创建文件
cat >yhh1.txt<<EOF
追加文件内容
cat >>yhh1.txt<<EOF
3.合并文件
cat file1 file2 > file3 覆盖file3
cat file4 file4 >> file3 追加file3
------------------------------------------------------
more 控制文本查看 在查看之前加载整个文件
+n 从第n行开始查看
-n 每次查看n行
+/pattern 从pattern所在行的前2行开始显示
--------------------------------------------------
tail
tail -n1 file.txt 显示最后一行
tail -n3 -f log.txt 不断刷新log