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

posted @ 2019-06-12 08:29  橙子牛奶糖  阅读(5670)  评论(0编辑  收藏  举报