递归地将所有文件转换为单个文件 [英] Recursively cat all the files into single file
本文介绍了递归地将所有文件转换为单个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一堆文件放在像
dataAAAjson1.json
dataAAAjson2.json
dataAABjson1.json
...
datajson_x.json
我想把所有的 jsons 放到一个文件中吗?
I want to cat all the jsons into one single file?
推荐答案
find data/ -name '*.json' -exec cat {} ; > uber.json
简短说明:
find <where>
-name <file_name_pattern>
-exec <run_cmd_on_every_hit> {} ;
> <where_to_store>
这篇关于递归地将所有文件转换为单个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文