[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Long text file to edit..



> 
> On Sun, Jul 19, 1998 at 12:23:59AM +0100, Ted Harding wrote:
> > On 17-Jul-98 Carlos Marcos Kakihara wrote:
> > >       I want to edit a 700MB text file. vi tells that the file is
> > > too long, and xemacs tells that "maximum buffer size something.." :)
> > >       There is a way to view this file?
> > 
> > Ehh?? Are you sure it's 700MB?? And are you sure it's a pure plain text file?
> > And, if so, have you thought about what that corresponds to? (And the same
> > question to the other contributors to this thread).
> 
> Well, maybe not to actually edit, but certainly to view and search. A log
> file with a high debug level for example, used to catch an occasional and
> unpredictable oops that may happen once only every few days.

If this is the case you better cut the file in pieces while it is
produced, and throw away bits that contain no oopses.  Anyway, the ideal
tool to handle this would be grep:

grep oops huge_file       # prints all lines with `oops'
grep -10 oops huge_file   # prints all lines with `oops', and 10 lines
                          # before and after each match
grep -A 10 oops huge_file # prints all lines with `oops', and 10 lines
                          # after each match
grep -B 10 oops huge_file # prints all lines with `oops', and 10 lines
                          # before each match

HTH,
Eric

-- 
 E.L. Meijer (tgakem@chem.tue.nl)          | tel. office +31 40 2472189
 Eindhoven Univ. of Technology             | tel. lab.   +31 40 2475032
 Lab. for Catalysis and Inorg. Chem. (TAK) | tel. fax    +31 40 2455054


--  
Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null


Reply to: