# cat /path/to/access_log | cut -d ' ' -f 1 | sort | uniq -c
・cutでスペース区切った1列目のみ抽出する。
・sortで同じIPが連続するようにソート(これが無いとuniqで同一だが不連続なIPが別物として扱われてしまう)
・uniqでカウント数を付加して出力
# cat /path/to/access_log | cut -d ' ' -f 1 | sort | uniq -c
てな感じでコマンドを実行すると、一定間隔(デフォルトは2秒だそう)毎にディレクトリ内の最新ファイルを20件表示してくれます。$ watch 'ls -lrt | tail -20'
として運用しています。$ watch 'ls -lrth /tmp/motion/*.avi | tail -5'