Created
March 8, 2011 04:57
-
-
Save u1tnk/859862 to your computer and use it in GitHub Desktop.
apacheのログを時間単位でカウント。ログフォーマットにもよるけど。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat hoge.log | awk '{print $5}' | cut -c 14-15 | sort | uniq -c | |
#awkは無条件で5番目を出力 | |
#cut は14から15文字目 | |
#sortはuniqueが前後しかunique化しないから必要。 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment