Concatenating multiple text files into a single file in Bash

前端 未结 12 1592
眼角桃花
眼角桃花 2020-11-29 15:31

What is the quickest and most pragmatic way to combine all *.txt file in a directory into one large text file?

Currently I\'m using windows with cygwin so I have acc

12条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-29 16:01

    How about this approach?

    find . -type f -name '*.txt' -exec cat {} + >> output.txt
    

提交回复
热议问题