Skip to content

Instantly share code, notes, and snippets.

@danicuki
Created March 9, 2012 14:18
Show Gist options
  • Save danicuki/2006707 to your computer and use it in GitHub Desktop.
Save danicuki/2006707 to your computer and use it in GitHub Desktop.
Usefull bash commands
#count sources in a tomcat.log access file
head -n 2000000 localhost_access_log.2012-03-09.log | cut -f1 -d" " | sort | uniq -c | sort -k2nr | awk '{printf("%s %s \n",$1,$2)}END{print}' |sort -n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment