1

script that extracts last 7 days of a log file

view story
linux-howto

http://www.linuxquestions.org – Hello all. I'm new to scripting and wondered if I could get a little help. I would like to execute a script that will extract or display the past 7 days of a log file. The log file is /var/log/messages and below is an example of the date format: May 11 06:01:40 hostname rtvscand: New virus definition file loaded. Version: 130510c. May 11 06:01:40 hostname rtvscand: Download of virus definition file from LiveUpdate server succeeded. May 12 06:01:27 hostname rtvscand: New virus definition file loaded. Version: 130511b. May 12 06:01:27 hostname rtvscand: Download of virus definition file from (HowTos)