Log Filtering

To identify (and count) the errors for files that aren't there

tail -100 error_log | cut -d']' -f 4-99 | sed -e "s/,referer.*//g"|sort|uniq -c

To grep a logfile for all occurrences of the word 'undefined', cut out just the referer links, and count them;

grep undefined ex070210.log | cut -d' ' -f10 | sort | uniq -c
Comments