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.  
posted @ 2018-08-25 16:25  jiftle  阅读(49983)  评论(0编辑  收藏  举报