February 2011
Intermediate to advanced
332 pages
9h 3m
English
We can translate a referer log to a human-readable format by using the command line utility awk. We can convert the entire referer.log file to a human-readable format by using the following command sequence:
$ cat referer.log | awk '{printf("%s ", strftime("%d/%b/%Y:%H:%M:%S",$1)); print $2 " " $3 " " $4;}' > referer_human_readable.log
The log messages from referer.log, as shown, should look like the following messages after conversion:
12/Sep/2010:01:36:06 127.0.0.1 http://en.wikipedia.org/wiki/Main_Page http://en.wikiquote.org/ 12/Sep/2010:01:36:12 127.0.0.1 http://en.wikiquote.org/wiki/Main_Page http://upload.wikimedia.org/wikiquote/en/b/bc/Wiki.png
The command we saw ...
Read now
Unlock full access