Re: Unable to grep 5 mins logs

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



Combine 2-3 greps:
>
> for (( i = 5; i>=0; i-- )) ; do grep `date "+%a"` | grep `date "+%b"` |
> grep `date "+%d"` | grep `date "+%Y"` | $(date "+%R" -d "-$i
> min") /var/ossec/logs/active-responses.log>>  /tmp/newlog.log;done
>
> Change order of greps to gain speed at first cutting part of lines with
> most hits.
>
> Ljubomir
> _

It is really slow when 2-3 greps are combined.

______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos
>
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux