[CentOS] which program/command (perl, vi, or sed) is better

2010-01-01 Thread ann kok
Hi I have apache log file around 7.6G and record half year Which program/command (perl, vi, or sed) is better to extract the data by date? and finally I can remove that big file and still keep the record. I have problem when using vi and it uses up the server memory Thank you for your help

Re: [CentOS] which program/command (perl, vi, or sed) is better

2010-01-01 Thread Frank Cox
On Fri, 2010-01-01 at 08:45 -0800, ann kok wrote: > Hi > > I have apache log file around 7.6G and record half year > > Which program/command (perl, vi, or sed) is better to extract the data by > date? Your question is a little too general. You want to extract what portion of the data, into w

Re: [CentOS] which program/command (perl, vi, or sed) is better

2010-01-01 Thread Les Mikesell
ann kok wrote: > Hi > > I have apache log file around 7.6G and record half year > > Which program/command (perl, vi, or sed) is better to extract the data by > date? and finally I can remove that big file and still keep the record. > > I have problem when using vi and it uses up the server memo

Re: [CentOS] which program/command (perl, vi, or sed) is better

2010-01-01 Thread Néstor
I have done similar programs in Perl (you can use PHP also) where, when I read the file in and using regex I select the records that I want to keep. Feliz Año :-) On Fri, Jan 1, 2010 at 9:14 AM, Les Mikesell wrote: > ann kok wrote: > > Hi > > > > I have apache log file around 7.6G and record h

Re: [CentOS] which program/command (perl, vi, or sed) is better

2010-01-01 Thread Les Bell
ann kok wrote: >> Which program/command (perl, vi, or sed) is better to extract the data by date? << The book "Perl for System Administration ", (David N. Blank-Edelman, O'Reilly, 2000) has a chapter on using Perl to analyse log files, rotate and compress them, etc. Luckily, this chapter is the