Program to split very large files by line count

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Curious Joe

    #1

    Program to split very large files by line count

    I have some files that are anywhere from 3GB to 9GB and I need to split
    them down to a series of smaller files similar to what the "split"
    command in linux can do. Unfortunately, I do not have access to a
    linux machine right now. I have been told that a program could be
    written in C/C++ that would do this very quickly.

    Can anyone point me to a tutorial or how-to that will teach me to write
    a quick program do accomplish this?

    for example

    split.exe <file.to.split< output.filename .prefix>
    <number.of.line s.per.file>

    split.exe bigfile.txt bigfile_ 1000000

    Thanks,

    CJ

  • Gianni Mariani

    #2
    Re: Program to split very large files by line count

    Curious Joe wrote:
    I have some files that are anywhere from 3GB to 9GB and I need to split
    them down to a series of smaller files similar to what the "split"
    command in linux can do. Unfortunately, I do not have access to a
    linux machine right now. I have been told that a program could be
    written in C/C++ that would do this very quickly.
    >
    Can anyone point me to a tutorial or how-to that will teach me to write
    a quick program do accomplish this?
    >
    for example
    >
    split.exe <file.to.split< output.filename .prefix>
    <number.of.line s.per.file>
    >
    split.exe bigfile.txt bigfile_ 1000000
    >
    Try installing mingw. It probably has the GNU splut command there.

    Comment

    • BobR

      #3
      Re: Program to split very large files by line count


      Gianni Mariani wrote in message
      <4553cfdd$0$305 9$5a62ac22@per-qv1-newsreader-01.iinet.net.au >...
      >Curious Joe wrote:
      >I have some files that are anywhere from 3GB to 9GB and I need to split
      >them down to a series of smaller files similar to what the "split"
      >command in linux can do. Unfortunately, I do not have access to a
      >linux machine right now. I have been told that a program could be
      >written in C/C++ that would do this very quickly.
      >>
      >Can anyone point me to a tutorial or how-to that will teach me to write
      >a quick program do accomplish this?
      >>
      >for example
      >>
      >split.exe <file.to.split< output.filename .prefix>
      ><number.of.lin es.per.file>
      >>
      >split.exe bigfile.txt bigfile_ 1000000
      >>
      >Try installing mingw. It probably has the GNU splut command there.
      "split.exe" is in 'Msys'.

      --
      Bob R
      POVrookie


      Comment

      Working...