Archive for September 28th, 2013

Extract referers from Apache logs

September 28th, 2013

This quick awk one-liner (tested on Linux) will extract all referer (referrer) entries from a combined Apache log file (called LOGFILE) excluding entries such as “”, “-“, (empty) and ones containing DOMAIN. Useful if you want to check where external referers are coming from
awk '($11 !~ /^"?-?"?$/ && $11 !~ /DOMAIN/) {print $11}' LOGFILE

gamy-dance
%d bloggers like this: