下面是一个Shell脚本,用于管理Redis进程(启动,停止,重启),这个脚本可供参考。 #!/bin/sh # # redis - this script starts and stops the redis-server daemon # # chkconfig: - 85 15 # description: Redis is a persistent
一条还是很常见,很实用,很简单的命令 netstat -ntu Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 127.0.0.1:8152 127.0.0.1:4193 TIME_W
一个可以把SSH连接错误超过5次的IP,自动添加到黑名单的脚本。有一定防扫描的功能,虽然说网上已经有类似的软件了,但还是想自己写个而已 #! /bin/bash cat /var/log/secure|awk '/Failed/{print $(NF-3)}'|sort|uniq -c|awk '{print $2"="$1;}' > /t
Copyright © 2005-2024 51CTO.COM 版权所有 京ICP证060544号