How to split one text file into multiple *.txt files?

前端 未结 9 602
[愿得一人]
[愿得一人] 2020-12-07 17:39

I got a text file file.txt(12 MBs) containing:

something1
something2
something3
something4
(...)

Is there any way to split

9条回答
  •  囚心锁ツ
    2020-12-07 18:22

    $ split -l 100 input_file output_file
    

    where -l is the number of lines in each files. This will create:

    • output_fileaa
    • output_fileab
    • output_fileac
    • output_filead
    • ....

提交回复
热议问题