We have file which is about 756 MB of size and vi/vim do not work when we try to edit this file. I'm looking for any editor ( ok if its NOT free ) which has the ability to open/edit a file of 1+GB seamlessly. The OS is SUN Solaris 10 ( Sparc )
If so, then this is because the temporary file it creates has to reside somewhere and the default is /var/tmp If that filesystem is not big enough then it will fail to open the file as you expect. You can re-direct the temporary file by editing your .exrc and including the following directive:-
set dir=/test/temp
.... or to wherever you have sufficient free space.
Of course, I've never tried to open such a huge file as a few hundred Mb, so this is not guaranteed to work!
What do you need from the file? If it's just browsing to confirm something, then more will suffice. If you really need to edit and save the result, you may need to split the file up, edit the required part and then reassemble it.
If it's data, perhaps you need some code to do the edit. You might get away with a sed for a single line if you can work out which line you need to change.
Can you tell us more about what your objective is and someone may be able to suggest more options for you.
To view/navigate in the file, I would suggest to use less , which has many all the vi commands outside those that change the file content.
To modify the file, I would use either sed or nawk .
I would say a paid option is also good in this case. This is needed by people who are NON-IT so it would be good if we had an editor rather than sed/awk script.Any suggestions on a non free editor ( for Sparc solaris)
Perhaps you need to split up the file into chunks that vi can manage then. If they need to edit it, then concatenate the pieces back together again when they are done. You could do something like this:-
It's pretty crude and you would need a temporary directory with sufficient space, I admit, but it might help.
If they are non-IT, then perhaps the vi editor is not for them though. Would you consider a Samba share that they can map from a PC and therefore use an editor of their choice? The only worry then is if someone chooses to save in a document format rather than plain text.
I doubt there is a market for a commercial text editor able to edit +1GB text files while there are undoubtedly freewares able to do it.
What kind of text files are these ?
What kind of editing commands are expected ?