Shell command to split large file into 10 smaller files

后端 未结 4 2073
清歌不尽
清歌不尽 2021-02-19 13:16

I have a csv import file with 33 million lines that need to be imported into my database. I can import it with a C# console app but then the stored procedures that run after the

4条回答
  •  礼貌的吻别
    2021-02-19 14:12

    splitting by line is good however you can also split by size

    creates 1MB files out of the original

    split -b 1024k  
    

    creates 1GB files out of original

    split -b 1024m 
    

提交回复
热议问题