linux - Ubuntu 下合并大批量文件,有没有高效的方法?
PHP中文网
PHP中文网 2017-04-17 16:39:33
0
2
359
PHP中文网
PHP中文网

认证0级讲师

reply all(2)
洪涛

You can try using the paste command to merge a large number of files: paste -d 'n' -s packages/*.txt > combine.txtpaste -d 'n' -s packages/*.txt > combine.txt

其实,原始文件切分并处理在一些情况下并不需要真正切分成大量的小文件之后才处理,可以利用较新版本的split命令配合选项--filter=COMMAND

In fact, in some cases, the original file does not need to be actually divided into a large number of small files before processing. You can use the newer version of the split command with the option --filter =COMMANDProcesses directly on the original file and writes the processing results directly to the file combine.txt.

This saves the process of splitting and merging. 🎜
Ty80

Your idea of ​​solving the problem must be wrong. I have never seen a document need to be divided into hundreds of thousands of parts.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!