登录IP列表: grep -Eo "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}.* 200" /srv/www/example.com/logs/access.log
独立的登录IP列表: grep -Eo "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" /srv/www/example.com/logs/access.log | uniq 验证后有效的方法
grep "Invalid user" /var/log/auth.log | grep -Eo "([0-9]{1,3}\.){3}[0-9]{1,3}" | sort | uniq 或
grep "Invalid user" /var/log/auth.log | grep -Eo "([0-9]{1,3}\.){3}[0-9]{1,3}" | sort -u (更有效率和节约资源)
shadowsocks 登录IP查询: grep "^2015-02-16" /var/log/shadowsocks.log | grep -Eo "from ([0-9]{1,3}\.){3}[0-9]{1,3}" | grep -Eo "([0-9]{1,3}\.){3}[0-9]{1,3}" | sort -u
https://www.linode.com/docs/tools-reference/search-and-filter-text-with-grep/
grep服务器维护用法——Filtering Logs with Grep