Re: how to get data from syslog for a specific date range?

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



> -----Original Message-----
> From: centos-bounces@xxxxxxxxxx [mailto:centos-bounces@xxxxxxxxxx] On
> Behalf Of Rudi Ahlers
> Sent: Thursday, July 07, 2011 7:04 AM
> To: CentOS mailing list
> Subject:  how to get data from syslog for a specific date
> range?
> 
> Hi all,
> 
> Can someone please tell me, or point me in the right direction ( I
> have googled, with little luck) on how to get data from
> /var/logs/messages (and other log files) for a specified fe days (i.e
> 19 - 30 June 2011) ?
> 

Give this a try:

grep -E '^Jun (19|2[0-9]|30) ' /var/log/messages

And to explain the argument following "-E" see:

man grep

--
Owen Beckley

_______________________________________________
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