Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a 140 MB text file, which contains detail information of books in library. For each book details there is a standard format data details in text file. I need to parse it and insert the data in Database. Here, parsing text file is not an issue. I am facing problem in parsing this large file. So i decided to split the file in small file around 2 MB each file. But i can't manually split this large file in so many pieces. I got HJsplit tool, which split the file but this also doesn't helped as this split the file but 1 book details half part is in one file and rest part is in second file. so if i split this way then information will be missed.

How to split the large so that i cant miss the information ? Is there any tool which help me in this condition.

share|improve this question

migrated from stackoverflow.com Dec 24 '11 at 2:07

This question came from our site for professional and enthusiast programmers.

Why is parsing the large file a problem? If the format is anything sequential, you could just read one record at a time, so memory can't be the limiting factor... but what is then? –  RandolphCarter Dec 23 '11 at 10:15
What problem do you get when you're trying to parse it? –  NoLifeKing Dec 23 '11 at 10:16

1 Answer 1

There is a program called gSplit to split a file into parts of a specified size.

For help, you might want to look at the following link.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.