To extract the monthly report of an Apache log file, use the Linux sed command. For example, to get the logs from July 1, 2015 to July 31, 2015, issue the command:
# sed -n '/1\/Jul\/2015/,/31\/Jul\/2015/ p' /opt/lamp/logs/access.log > Jul2015_log
No comments:
Post a Comment