How can I output first and last time of an access_log so that I can quickly check which time range access_log keep records between?Output may look like:[21/Aug/2014:06:29:41 -0400] :::: [21/Aug/2014:10:29:41 -0400]My access_log path is:/var/www/vhosts/example.com/statistics/logs/access_logExample Access Log Entry:123.123.123.123 - - [21/Aug/2014:08:12:30 -0400] GET /wp-content/themes/simple/comment-style.css HTTP/1.1 200 6221 http://example.com/?p=1 Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Firefox/31.0
Access Log Timespan
logs
If your log entries are not in strict chronological order, on a GNU system, you can do:#          1         2# 12345678901234567890# [21/Aug/2014:06:29:41 -0400]< access.log sed -n 's/^[^[]*\(\[[^]]*]\).*/\1/p' |  sort -k1.9n -k1.5M -k1.2n -k1.14,1.21 |  sed -n '1p;$p' | paste -sd -The result is probably going to be wrong one day per year upon the switch between summer time and winter time.