Linux下平均分割大文件

时间:2014-09-04 19:07:30   收藏:0   阅读:250

下面表示将 dataset分割成小文件,每个10000行,以数字作为后缀形式,一共占两位

split -l 10000 dataset -d -a 2 partition_dataset_ 


如果有不明白的

split --help

man split


合并小文件为一个大文件:

find dir -type f -name "partition_dataset_*" -print | xargs cat > final_results


原文:http://blog.csdn.net/hongchangfirst/article/details/25244153

作者:hongchangfirst

hongchangfirst的主页:http://blog.csdn.net/hongchangfirst


评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!