Skip to content

Instantly share code, notes, and snippets.

@riivo
Created March 6, 2011 12:07
Show Gist options
  • Select an option

  • Save riivo/857235 to your computer and use it in GitHub Desktop.

Select an option

Save riivo/857235 to your computer and use it in GitHub Desktop.
Find hostnames of top 10 IP-addresses in you web server log file
cat access.log | awk '{print $1}' | sort | uniq -c | sort -r | head | awk '{print $2}' | xargs -L1 host
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment