命令:

ps -ef | grep redis | awk '{print $2}' | xargs kill -9

用法

#先查看下进程

[root@S019875 ~]# ps -ef|grep redis

root     19734 19677  0 11:31 pts/1    00:00:00 src/redis-server *:6379

#删除

[root@S019875 ~]# ps -ef | grep redis | awk '{print $2}' | xargs kill -9