Detect Bots

Navigate to /var/log/httpd (or where ever your access logs reside) and get a ranked list of user agents that have hit your site today.

cat access_log | grep `date ‘+%e/%b/%G’` | awk -F” ‘{ print $6 }’ | sort | uniq -c | sort -frn | head -n 25

Be the first to comment

Leave a Reply