On Thu, April 5, 2007 9:40 am, Jean-Rene David wrote: >> Just out of curiosity, why are you trying to >> edit a 1 GB file with any text editor? I'm >> assuming that these files are flat file >> databases. > > I need to do that quite often. They are usually > log files from a long running program in debug > mode.
Actually, you can think of a log file as a sort of flat file database. Here's an example ... 2007-04-05 07:15 INFO - Starting process 2007-04-05 07:20 DEBUG - foo is non-zero 2007-04-05 08:15 WARNING - Cannot write to /dev/foo file 2007-04-05 10:15 CRITICAL - Lost db connectivity ... This may look like a regular log file, but using a tool such as awk, you can split it into a 4-column text database with the following columns: * datestamp * timestamp * logtype * message Then, like Tim said, you could grep based on any column value to "query" the information that you really need, write that to a new file, and *then* view/edit it using Vim. HTH! Tom Purl