redis使用redis-cli查看所有的keys及清空所有的数据

redis_home:redis安装路径:

cd %redis_home%/src

./redis-cli -h 127.0.0.1

  1. 127.0.0.1:6379> keys *
  2. (empty list or set)
  3. 127.0.0.1:6379> keys *
  4. 1) "652d085ae54d4a1faca9db57f5a32e57"
  5. 2) "a13991c60d13485bb23b31c7abb9712a"
  6. 3) "e1796a709c0f4e7093bb0d49a03953ee"
  7. 4) "e7d44a40cacc4bca8be7649a545f642d"
  8. 5) "bfa16cf345e447f895b91742fee63c3f"
  9. 6) "c681aaeeb56b472b99885164702208df"
  10. 7) "a47937356b1244e3adb672c210776ecb"
  11. 8) "a1b47ee28a6b442d933e7ab838c57367"
  12. 9) "8713ff5043414f7cbde68ad5a7810585"
  13. 127.0.0.1:6379> keys *
  14. 1) "652d085ae54d4a1faca9db57f5a32e57"
  15. 2) "a13991c60d13485bb23b31c7abb9712a"
  16. 3) "e1796a709c0f4e7093bb0d49a03953ee"
  17. 4) "4a9b87b8259c192493e7fa4eac49b254"
  18. 5) "30a828e412100ae46c1bdf01259438e3"
  19. 6) "e7d44a40cacc4bca8be7649a545f642d"
  20. 7) "bfa16cf345e447f895b91742fee63c3f"
  21. 8) "c299ced6e5e731975468e1355ccf9be1"
  22. 9) "7d963b1ce1ad48946087eb6b80c4f27a"
  23. 10) "c681aaeeb56b472b99885164702208df"
  24. 11) "a47937356b1244e3adb672c210776ecb"
  25. 12) "34ea60fd6f0fb639f3c6304e860a914"
  26. 13) "a1b47ee28a6b442d933e7ab838c57367"
  27. 14) "8713ff5043414f7cbde68ad5a7810585"
  28. 127.0.0.1:6379> flushall
  29. OK
  30. 127.0.0.1:6379> keys *
  31. (empty list or set)

转载于:https://www.cnblogs.com/lxwphp/p/9583711.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值