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
link|improve this question
feedback

1 Answer

up vote 1 down vote accepted

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

split -l 1000000
link|improve this answer
Ahhhh Thank you so much Daniel, it was so simple!!! Ich danke lhenen :D – user305883 Feb 11 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 at 9:27
thank you, did it. cannot vote yet :) – user305883 Feb 11 at 9:29
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 at 9:30
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.