[svlug] edit a 1GB file
N. Thomas
nthomas at cise.ufl.edu
Sun Mar 30 18:32:07 PST 2003
* Matt Billenstein <matt at vazor.com> [2003-03-30 16:36:35 -0800]:
> If I want to edit a really big text file, what is the best way to do
> it? I'm using vim right now, but it's being a little slow since it
> seems to read the whole file into the buffer and then write the whole
> file out again when I save it.
Large files, -- larger than, say, 300Mb or so -- are somewhat difficult
with Vim. You can do some things to minimize problems (such as not using
a swapfile (vim -n), and playing with 'maxmem'/'maxmemtot' and other
variables.
You are probably better off using a non-interactive editor like sed,
Perl, Python, etc., or splitting up the file (ala split), editing the
pieces, and then recombine them with cat -- that's what I always do.
Preben "Peppe" Guldberg made a good Usenet posting on this:
slrna7q7p0.gmp.c928400 at bohr.gbar.dtu.dk
thomas
--
N. Thomas
nthomas at cise.ufl.edu
Etiamsi occiderit me, in ipso sperabo
More information about the svlug
mailing list