linux append all files to the new file (cat)

The following example, there is test1.txt, test2.txt, test3.txt, is now ready to put the contents of the three documents are appended to the 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

You can use the command: cat test1.txt test2.txt test3.txt > testall.txtgenerates the following documents:

testall.txt
1 2 3
4 5 6
a b c
e f g
59 9 6
z c b

Of course, there are more Sao operation, that is,cat test* > testall.txt

Guess you like

Origin www.cnblogs.com/chenwenyan/p/11007463.html