Splitting very large files on slow computers?

110 Views Asked by At

I have several xml files. They're very big, and my computer is quite slow. I can't open them in notepad. What is the fastest, easiest way to divide these files into equal parts, still in xml format, in Windows?

1

There are 1 best solutions below

1
On
  1. Install MSYS for Windows
  2. You can then use the sed command to pipe chunks of your file into another temp file.

    sed -n [start],[end]p filename > tmp.xml

where, [start] is the starting line number, and, [end] is the ending line number. Of course, you'll have to run this command repeatedly. And, you'll need to know the total number of lines to divide the file into equal parts.