How to append contents of multiple files into one file

前端 未结 11 2165
既然无缘
既然无缘 2020-12-22 15:49

I want to copy the contents of five files to one file as is. I tried doing it using cp for each file. But that overwrites the contents copied from the previous file. I also

11条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-22 16:47

    You need the cat (short for concatenate) command, with shell redirection (>) into your output file

    cat 1.txt 2.txt 3.txt > 0.txt
    

提交回复
热议问题