Edit large mbox files
A safer solution is to use a text or hex editor that knows how to edit files larger than 1GB without having to load the entire file in memory.
- JujuEdit is text editor that can edit 2GB files and has a GUI similar to notepad. It works under Windows.
- HiEditor is a text editor that can open any size text file. It works under Windows.
- ifhex is a hex editor that requires less than 2MB of memory to load a 2GB file. It works under Linux (requires Qt).
- HexFiend is a hex editor that can edit files up to at least 118GB. It works under OSX.
can edit files of up to 2GB on 32-bit machines, especially if you disable the swap and backup file support (it's also a good idea to disable syntax highlighting) and it works on most platforms including Windows, Unix, Linux, Mac, VAX/VMS, etc., but unless you're used to Vi you may find it awkward to use at first. There is a LargeFile
plug-in that disables certain features to increase speed.
Emacs used to be a good solution but recent versions have a low filesize limit due to the elisp pointer representation. Textpad
is another popular choice but it's limited to "file sizes up to the largest contiguous chunk of virtual memory". It can be hard to get a 1GB chunk if you don't have a lot of memory.
You could also use a file splitter such as Gsplit
to split the file into several pieces, edit one or more of the pieces, and then have it recombine them. Gsplit can split 4GB files and creates a small program to join the pieces back together.
If you're running a 64 bit operating system with 4GB of memory text editors such as Notepad++
(a notepad replacement) that can edit any file that can fit in virtual memory will work. Vim (again, if you're willing to learn it) can also edit very large files on 64-bit systems.