Re: OT: perl vs shell cmd

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

 



At 1:14 PM +0700 6/14/05, Beast wrote:
>Supose I want to parse a big log file (~500MB/4mil lines), which one is
>faster and use less memory:

  [...perl vs. grep on whole file]

Since you seem to want to do this hourly, use some form of tail (tail -F
[FILE]?  man tail).  Unless you want to process all the data, there isn't
much point in reading all the data.

BTW, several times I've seen grep suck up all of memory and swap, rendering
the system very sluggish, even after grep runs out of memory.  Someday I'll
look into it further.
____________________________________________________________________
TonyN.:'                       <mailto:tonynelson@xxxxxxxxxxxxxxxxx>
      '                              <http://www.georgeanelson.com/>


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux