查看文件内容
[root@salt-server-192 sh]# cat 5.txt ada sada sadas
-n 查看文件内容并显示行数
[root@salt-server-192 sh]# cat -n 5.txt 1 ada 2 sada 3 sadas
非交互式写入文件
[root@MongoDB ~]# cat >>1.txt<<EOF > aaa > bbb > helo > EOF [root@MongoDB ~]# cat 1.txt aaa bbb helo
查看文件内容
[root@salt-server-192 sh]# cat 5.txt ada sada sadas
-n 查看文件内容并显示行数
[root@salt-server-192 sh]# cat -n 5.txt 1 ada 2 sada 3 sadas
非交互式写入文件
[root@MongoDB ~]# cat >>1.txt<<EOF > aaa > bbb > helo > EOF [root@MongoDB ~]# cat 1.txt aaa bbb helo