1

I have been trying to split a large file (some GB) into pieces, I need to chunk the file by linenumber (say, containings about 1M lines each).

How could I do? csplit does not work, goes out of memory. Below, an example of the content:

690451  World_War_II    Allies_of_World_War_II
690451  World_War_II    Axis_powers_of_World_War_II

1 Answer 1

3

Use the command line tool split with the -l (lines) option.

split -l 1000000
3
  • Ahhhh Thank you so much Daniel, it was so simple!!! Ich danke lhenen :D
    – user305883
    Feb 11, 2012 at 9:25
  • You're welcome. Please remember to click the checkmark next to my answer to mark this question answered.
    – Daniel Beck
    Feb 11, 2012 at 9:27
  • Thanks. Although I have to add to my answer, it ignores any context. But except for the title, you didn't mention that again, so I wasn't sure how to interpret that...
    – Daniel Beck
    Feb 11, 2012 at 9:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .