Revision: 26366
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at April 26, 2010 04:53 by level09
Initial Code
cat /path/to/log | awk '{print $3}' | sort | uniq -c | sort -rn | head -20
Initial URL
Initial Description
we grab the 3rd column (using awk), we sort all the results, we then unique that output (-c gives us a count), and then sort numerically based on the count we also sort ascending (-r) ... the head then gives us the top 20 IP addresses
Initial Title
Analyse Access Log, find most common ip addresses
Initial Tags
Initial Language
Bash