Re: Sorting out of sequence log Apache log file

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

 



On Wednesday 26 April 2006 13:13, Chris W. Parker wrote:
> Allen K. Smith <mailto:lazlor@xxxxxxxxxxxxxxxxxx>
>     on Wednesday, April 26, 2006 1:04 PM said:
> 
> > sort -t[ -k 2.4,6M -k 2.1,2n access_log
> 
> Maybe I'm not using it correctly but that made the file even worse.
> 
> # sort -t[ -k 2.4,6M -k 2.1,2n Feb-14.log > Feb-14_sorted2.log
> 
Can you copy a couple of lines in? I was just using a generic apache log as an example, so the field positions may be wrong..

sort -t[ -k 2.4,6M -k 2.1,2n -k 2.13,19n 

would catch the timestamps as well (d'oh).

With a handful of example lines should be able to make it exact, it there enough data in the source file to give you what you need.

> After about a minute I got back a file with the log entries mixed up
> even more. Did I do something wrong?
> 
> 
> 
> Thanks,
> Chris.
> 

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux