help-gnu-utils
[Top][All Lists]
Advanced

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

Help grepping last 5 minutes of syslog


From: Joseph
Subject: Help grepping last 5 minutes of syslog
Date: 15 Sep 2004 07:12:34 -0700

Hi everyone,

Can someone please help me with a grep command? I am looking for a way
to display only the last 5 minutes' worth of syslog entries.

This will of course give me the current minute's entries:

grep "`date +\"%b %e %H:%M\"`" /var/log/messages

But I don't know how to construct a regex which will give a range that
encomapses the previous 5 minutes instead of just %M.

Any tips on how to do this?

Thanks,

Joseph

reply via email to

[Prev in Thread] Current Thread [Next in Thread]