How to split huge .csv files to multiple .csv files based on size?
Show older comments
I am trying to split huge .csv files (11 GB) that has both combination of text and numbers into mutiple files based on size (0.5 GB each). I tried using some of the answers in the matlab community but no luck
I hope someone can help!
4 Comments
dpb
on 21 Nov 2018
Shoulda' never created that large and unwieldy a text file to begin with... But you now know that, already... :)
Can you guesstimate how many lines are in the files at present? I'd probably just write a filter and copy N lines to a new file in a loop to determine that answer, then just put that in a nested loop until you run out of lines in the original. Lather, rinse, repeat...
Anjan
on 21 Nov 2018
Walter Roberson
on 21 Nov 2018
Edited: Walter Roberson
on 13 Feb 2021
Which OS? The easiest way to do this is with the unix split command , quite easy . For Windows I would look at https://www.gdgsoft.com/gsplit/
Anjan
on 25 Nov 2018
Accepted Answer
More Answers (0)
Categories
Find more on Large Files and Big Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!