How to split large text file in windows?

后端 未结 6 1147
野的像风
野的像风 2020-12-12 13:30

I have a log file with size of 2.5 GB. Is there any way to split this file into smaller files using windows command prompt?

6条回答
  •  死守一世寂寞
    2020-12-12 14:21

    You can use the command split for this task. For example this command entered into the command prompt

    split YourLogFile.txt -b 500m
    

    creates several files with a size of 500 MByte each. This will take several minutes for a file of your size. You can rename the output files (by default called "xaa", "xab",... and so on) to *.txt to open it in the editor of your choice.

    Make sure to check the help file for the command. You can also split the log file by number of lines or change the name of your output files.

    (tested on Windows 7 64 bit)

提交回复
热议问题