Redis命令总结

1.用脚本批量删除key

redis-cli -h 127.0.0.1 keys "MAIN:GAME:GID:*" | xargs redis-cli -h 127.0.0.1 del

2.切换db库批量删除

redis-cli -h 127.0.0.1 -n 4 keys "H:I:s011:S:I*" | xargs redis-cli -h 127.0.0.1 -n 4 del

posted @ 2015-10-22 14:51  hiwen  阅读(134)  评论(0编辑  收藏  举报