redis集群批量删除某些key

for i in 123 124 125 126
do
redis-cli -h 192.168.0.${i} KEYS key_prefix_:*|xargs redis-cli -h 192.168.0.1 -n 0 del
done

 

posted @ 2021-07-15 20:12  浮尘微光  阅读(141)  评论(0编辑  收藏  举报