DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Find Ip Addresses In Apache Logs

04.01.2009
| 5415 views |
  • submit to reddit
        The below will generate a list of IP address along with the number of times each was encountered sorted with the greatest number at the bottom.

cat access_log | awk '{print $1}' | sort | uniq -c | sort -n