linux追加所有文件到新的文件(cat)
例子如下,存在test1.txt, test2.txt, test3.txt,现在准备把这三个文件的内容都追加到testall.txt 中
test1.txt
1 2 3
4 5 6
test2.txt
a b c
e f g
test3.txt
59 9 6
z c b
则可以使用命令:cat test1.txt test2.txt test3.txt > testall.txt
, 生成如下文件:
testall.txt
1 2 3
4 5 6
a b c
e f g
59 9 6
z c b
当然,还有更骚的操作,那就是cat test* > testall.txt
本文来自博客园,作者:橙子牛奶糖(陈文燕),转载请注明原文链接:https://www.cnblogs.com/chenwenyan/p/11007463.html