Jump to content
Can't remember your login details? Read more... ×
satyricon11

Large Text Document won't open

Recommended Posts

So I have a 1.5 gig text document that I need to open and edit. I've gone online and tried multiple programs to open it but nothing seems to work. Every time I open it the program either freezes or crashes. Does anyone have any ideas?

 

PS: I'm running ubuntu and I've tried using the split command but even after I split the document its still to large

Share this post


Link to post
Share on other sites

I doubt I'm running out of RAm. I'm running 16Gb

You may have plenty of RAM, but do you know if you have enough free contiguous memory available? The operating system needs a big enough chunk of memory it can cram all that data into, but if your available memory has other data sprinkled around it in a piecemeal fashion then there probably isn't a big enough clear slice for the text file to open up in.

 

Think of it like a carpark that's only half-full and you need to slot in one of those giant mining trucks. If you have all the cars pushed over into one half you'll have a nice, big, clear space that will nicely accommodate the truck. However, if the cars are evenly spaced out across the whole carpark then you won't be able to bring in the truck or you'll squash something. The amount of available space is exactly the same in both instances, it's just arranged differently.

 

Your best best will probably be to try slicing the file into smaller bits, even 750Mb is still a hefty chunk to open all at once. I'd say at least quarters or even eighths would be best.

 

What is the text file? Is it something that needs to be opened all at once? There may be a way to parse it and just extract the bits you want.

Share this post


Link to post
Share on other sites

If you know that it's purely text, then you should be able to simply split the file.

 

You mention you've split the file, but how small did you split it?

I think 100MB chunks should work well.

Share this post


Link to post
Share on other sites

Is there a way that I could dedicate certain memory to being contigious so I can open the file? And thanks, I will check out ultredit and get back with the results

Share this post


Link to post
Share on other sites

Obvious question perhaps, but not covered in this thread: Do you have enough disk space?

 

vim by default creates a swap file which is like a copy of the file for recovery. It might try /tmp which might be a full partition. If you run with vim -n, this swap file won't be created.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×