Edit large mbox filesFrom MozillaZine Knowledge Base
Undeleting a message or trying to repair a corrupt folder sometimes requires a editor that can open a 1GB or larger file. Most text editors can't open that large a file. You normally need enough memory available for the original file plus a copy. The problem is that most 32 bit Windows applications can't access more than 2GB even if you have enough memory plus swap file available. Its possible to increase that to about 3GB by editing the boot.ini file settings and using a utility to set a flag in the .EXE's header but thats risky. 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.
Vim 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. 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. [edit] See also[edit] External links
|
|