免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: itryhang

请教关于文件分割的问题 [复制链接]

论坛徽章:
0
发表于 2010-04-08 14:45 |显示全部楼层
回复  crowsy001


    这个文件的记录数会很多,可能会有几亿条记录,如果用wc -l来统计的话时间会很长 ...
itryhang 发表于 2010-04-08 14:06



    如果每行的个数都一样可以考虑直接按照 用参数 b
-b Number
            Splits the file into the number of bytes specified by the Number variable. Adding the k (kilobyte) or m (megabyte) multipliers to the end of the
            Number value causes the file to be split into Number*1024 or Number*1,048,576 byte pieces, respectively.

论坛徽章:
0
发表于 2010-04-12 09:27 |显示全部楼层

,

本帖最后由 itryhang 于 2010-04-12 09:32 编辑

回复 10# Shell_HAT


    是的,是定长的文件。周末两天不能上网,帖子都沉了

论坛徽章:
33
ChinaUnix元老
日期:2015-02-02 08:55:39CU十四周年纪念徽章
日期:2019-08-20 08:30:3720周年集字徽章-周	
日期:2020-10-28 14:13:3020周年集字徽章-20	
日期:2020-10-28 14:04:3019周年集字徽章-CU
日期:2019-09-08 23:26:2519周年集字徽章-19
日期:2019-08-27 13:31:262016科比退役纪念章
日期:2022-04-24 14:33:24
发表于 2010-04-12 10:43 |显示全部楼层
那直接用11楼的-b不行么?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP