Is there any text editor, which can edit such file?
Another method is to use
split. Split the file into 8 pieces and manipulate the files with a editor. After that, you reassemble the files again.
split -b 53750k <your-file> cat xa* > <your-file> SYNOPSIS split [OPTION]... [INPUT [PREFIX]] -a, --suffix-length=N use suffixes of length N (default 2) -b, --bytes=SIZE put SIZE bytes per output file -C, --line-bytes=SIZE put at most SIZE bytes of lines per output file -d, --numeric-suffixes use numeric suffixes instead of alphabetic -l, --lines=NUMBER put NUMBER lines per output file
Try joe. I just used it to edit a ~5G SQL dump file. It took about a minute to open the file and a few minutes to save it, with very little use of swap (on a system with 4G RAM).
you will not find them. If you want to replace some lines in this file, you can look at with
less or grep and use
sed to search and replace some lines.
sed -e 's/oldstuff/newstuff/g' inputFileName > outputFileName
on Wikipedia are some useful examples: http://en.wikipedia.org/wiki/Sed
Give it a go, if you like, but such big files become impractical if you want to do "normal" editing; eg, you don't want to go saving your edits too often; it will take too long :)
If it's for a one off,
join would work quite well, and it is simple enough to chop it up into managable chunks, and then rejoin the pieces... Take note that many editors will add a newline character to the end of your edited file, and do it without informing you! For more info see How to stop Gedit, Gvim, Vim, Nano from adding End-of-File newline char?
Try Gvim if you really want edit such a big file.... I've just loaded a 3.9GB file into it, and all seems to be normal...
Here is an interesting link on the matter, at stackoverflow
There is another very simple and fast way to replace content in very large files (which works instead of editing large mysql dumps)
First of all you should install midnight comander - great file manager for linux systems
sudo apt-get install mc
After that you may open any file of any size in "view mode" (with F3 shortcut), switch to HEX view (F4 shortcut) and activate edit mode (F2 shortcut).
For example, I had 3 GB mysql dump, where I want to remove some SQL line. I open view mode, find string, open hex mode and replace content before needed line with MYSQL comment (string "-- ", hex codes 2D 2D 20).
Use glogg - the fast, smart log explorer: http://glogg.bonnefon.org/
010 Editor is great for me, works very fast.
nedit text editor has been around a long time and is quite capable. It can open a 1.9Gb text file in about 20 seconds. It's a windows-like graphical interface with all the standard text editing features you'd expect like syntax highlighting, indenting, line numbering, and so on.
If you want to resize the window, do that before opening the large file. The X11 Motif is a bit slow on the resize, but it's also a taxing request.
It's in all the standard repositories, so install with:
sudo apt-get install nedit
It is GPLv2 open source.
I'm wading through 30-40Mb text files and
nedit handles them easily.
According to this Wikipedia article Comparison of text editors VIM among others. I was going to suggest Geany but there is a ? in the field for large file support...
EDIT: I went ahead and tried with geany and gave up after waiting 10 minutes with 3 cores pegged and basically all my memory (virtual and physical) in use the entire time... Not conclusive since it might have managed to open it if I'd been more patient. I looked for and did not find any settings/preferences for handling large files differently as well.
I like fred.bear's answer best.
In Windows you have TextPad, EditPad and EmEditor.
In Linux you have
All of them allow you to edit very large files (even terabyte) and you can do it easily, without needing to split and recombine the file, which is prone to error and cumbersome.
You can open the file using
However you will only be able to change text, not add or remove it.
We get into a situation where log file accumulated to 6GB and need to search by date or string. Few well known text editor could support for such a big file.
Found the JOE editor which is able to load my file of 6GB in 2 mins and enabled to explore the file.
Windows version (sourceforge.net)
I work with NetBeans: it is better than Eclipse in that context.
I know that it is for developers, but you can open any plain text file with it.
Emacs will do the job (I've edited 10+GiB files in it before), but is approximately as unfriendly to the new user as vim, so may not sit your needs. The learning curve is pretty steep.
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?