How to split a large text file into smaller files with equal number of lines?

前端 未结 10 685
一整个雨季
一整个雨季 2020-11-22 16:42

I\'ve got a large (by number of lines) plain text file that I\'d like to split into smaller files, also by number of lines. So if my file has around 2M lines, I\'d like to

10条回答
  •  渐次进展
    2020-11-22 17:27

    use split

    Split a file into fixed-size pieces, creates output files containing consecutive sections of INPUT (standard input if none is given or INPUT is `-')

    Syntax split [options] [INPUT [PREFIX]]

    http://ss64.com/bash/split.html

提交回复
热议问题