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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM