【问题标题】:Using command line to split files使用命令行拆分文件
【发布时间】:2013-02-04 16:49:17
【问题描述】:

这是我目前用来分割文件的方法:

split -l 500 myfile.txt file_

它会自动创建file_aa、file_ab等文件。

有没有办法使用数字而不是字母,使其成为 file_1、file_2 等?

【问题讨论】:

    标签: shell command-line ssh command


    【解决方案1】:

    man split 说:

    split -d -n 4 -l 500 myfile.txt file_
    

    split --numeric-suffixes --digits=4 --lines=500 myfile.txt file_
    

    【讨论】:

    • 一旦达到 99 个文件,它就会显示“拆分:输出文件后缀已用尽”
    猜你喜欢
    • 1970-01-01
    • 2018-06-16
    • 1970-01-01
    • 2013-11-14
    • 1970-01-01
    • 2011-02-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多