Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a tool to split large text file (9Gb) into smaller files so that I can open it and look through.

Anything usable from command line that comes with Windows (XP)?

Or what's the best way to split it. Can I use 7z to create separate volumes and then unzip one of them separately? Will it be readable or does it need all the other parts to unzip into the big file again?

Update

I put together quick 48 lines python script that split the large file into 0.5GB files which are easy to open even in vim. I've just needed to look through data towards the last part of the log (yes it is a log file). Each record is split across multiple lines so grep would not do.

share|improve this question
I see you edited to mention grep. Do you have cygwin or unxutils installed? You could have used grep -n with head and tail to see chunks of the file. Example, grep -n "something" file.txt returns 95625: something. You want to see that line and 9 lines below it for a total of 10 lines: head -n 95635 file.txt | tail -n 10. – John T Jan 11 '10 at 4:10
I notice you solved your problem, If you're still around, could you post the solution so others might benefit? – Journeyman Geek Oct 19 '12 at 3:30

migrated from serverfault.com Jan 11 '10 at 1:25

3 Answers

up vote 6 down vote accepted

There is a freeware Windows file splitter called HJSplit 2.4

Available here. The website claims it can split files of any type and size, but 9GB is a big file.

share|improve this answer
1  
According to the publisher, it supports splitting of files "over 100 Gigabytes" – yosh m Apr 11 at 7:57

Another is GSplit - according to their site it can split very large files (larger than 4Gb <-- since they crossed the 4Gb limit, I guess they can do 9 Gb as well).

But, another thing - you say you want to split it into smaller parts so you can open it up and look at it. That sounds like a very big perhaps log file.

In any case, for opening large text files, may I recommend EmEditor - they claim themselves it can open very large files (up to cca. 250 Gb), and I've used it in the past for files up to 2 Gb. But in any case, I think it may be a better solution than splitting.

share|improve this answer
I've just tried out GSplit. It works, albeit through a confusing interface, but it doesn't offer any way to only split at a linebreak - for splitting ASCII data files, therefore, it's not too useful as the split will be half way through a line. – Simon Waldman May 10 at 15:09

Check out Large Text File Viewer, it's great for things like this. Most archivers and splitters will separate the file into pieces which cannot be used to read each piece of data independently and properly, you need to extract them all to get the file back.

alt text

Large Text File Viewer is free and portable.

share|improve this answer
1  
The link seems to be broken, this works as of now: softpedia.com/get/Office-tools/Other-Office-Tools/… – huseyint Jul 11 '12 at 20:24

Your Answer

 
discard

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

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