linux查看某IP尝试连接成功和失败次数时间:2023-03-09 23:11:58 查看连接失败次数 cat /var/log/secure | awk '/Failed/{print $(NF-3)}' | sort | uniq -c | awk '{print $2" = "$1;}' 查看连接成功次数 cat /var/log/secure | awk '/Accepted/{print $(NF-3)}' | sort | uniq -c | awk '{print $2" = "$1;}'