ほとんどWordPressの、しかも自作プラグインNichePatchの記事ばかりですが、未だにアクセスの多いshell系も気まぐれに更新していこうかと思います。
思いつくところでは、Apacheのアクセスログ(フォーマットはデフォルト設定)から、アクセス元IPアドレスをユニークに抽出するワンライナー。
1 |
$ cat [access_log] | awk '{print $1}' | sort | uniq |
※WordPressが勝手にシングルクォート等を全角に変換してしまうようなので、注意してください。(昔からですね。NichePatchで対応か?う~ん。)
※[access_log]を該当のアクセスログファイル名に変更してください。
こういう場合ってcatが良いのか正直よくわかっていません。(昔あまりよくないように聞いた記憶はありますが・・・)
No comments yet. You should be kind and add one!
By submitting a comment you grant typista a perpetual license to reproduce your words and name/web site in attribution. Inappropriate and irrelevant comments will be removed at an admin’s discretion. Your email is used for verification purposes only, it will never be shared.