[CentOS] Unable to grep 5 mins logs
ankush grover
ankushcentos at gmail.comMon Jun 13 12:59:35 UTC 2011
- Previous message: [CentOS] Unable to grep 5 mins logs
- Next message: [CentOS] Unable to grep 5 mins logs
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 at centos.org > http://lists.centos.org/mailman/listinfo/centos >
- Previous message: [CentOS] Unable to grep 5 mins logs
- Next message: [CentOS] Unable to grep 5 mins logs
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list