Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Help on script to capture info on log file for a particular time frame

$
0
0
Hi

I have a system running
Code:

uname -a
Linux cmovel-db01 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux

I would like to capture the contents of /var/log/syslog from 11:00AM to 11:30AM and sent to this info via email.

I was thinking in set a cron entry at that time to
Code:

tail -f > filename
, them
Code:

mailx
the file, but I am not sure how to stop capturing data at 11:30AM.
Can I have some help on this

Viewing all articles
Browse latest Browse all 16232

Trending Articles