redis删除以什么开头的key

1.退出redis

2.匹配product开头的所有key*删除

redis-cli -a 你的密码 keys 'product*' | xargs redis-cli -a 你的密码 del


ps:密码没有请忽略

3.redis返回删除条数

(integer) 4

https://blog.csdn.net/guoyanga1/article/details/79087334

如果报错  

-bash: !@#789: event not found

在bash中,

!有着特殊的含义;

只需在!前加上(对!进行转义),也即!",即可打出感叹号了。也可以登录了


https://blog.csdn.net/wzqzhq/article/details/64907155
原文地址:https://www.cnblogs.com/angdh/p/11956920.html