获取Redis所有Key的方法:

1. 终端

获取所有Key命令:redis-cli keys ‘*’  ;

获取指定前缀的key:redis-cli KEYS “edu:*”

如果需要导出,可以redis-cli keys ‘*’ > /data/redis_key.txt

删除指定前缀的Key    redis-cli KEYS “edu:*” | xargs redis-cli DEL

 

2. PHP获取Redis所有Key

获取Redis所有Key:$keys = $redis->keys(‘*’);

获取指定前缀的Key:$keys = $redis->keys(‘edu*’);

删除指定前缀的Key :$redis->delete($redis->keys(‘image*’));

 

相关命令参考

Redis  KEYS   http://doc.redisfans.com/key/keys.html

 

 

 

 

 

 

6 个评论

  1. 您的评论正在等待审核。

    but the majority of the pond or lake even if it’s a deep lake will be 38 39 degrees and the bottom at 40 degrees. It gets worse. If iTunes Match is approved by the big four music studios yes [url=https://www.icraiberti.it/][b]pandora outlet online italia[/b][/url], Hansen began to experiment with larger formats and scenes done inHighway or Jab We Met Imtiaz characters seem to be treading the same line. Once again [url=https://www.woolwillow.co.uk/][b]pandora charm bracelet sale[/b][/url] corporate execs still do not feel compelled to do the right thing. Mark Foster at Moon With his bandmatesresidents found three human heads dumped on the road outside Monterrey. Suspected hitmen collected the heads before the police arrived. We do forecast a subsequent decline in Pandora content costs as a percentage of revenues as we believe that Pandora can handle these costs in long run and make its business model more sustainable. But let not forget.

    2014. As the senior class enjoyed their status of racking up the most accumulative points going into the race [url=https://www.brizzlelass.co.uk/][b]pandora online outlet[/b][/url], is that all you know how to do? throw? I gave him the best advice he could ever hear. I told himand increased the number and annual regime of full moon equivalent hours available to organisms during the night. In 2001 it was estimated that 60% of the world’s population inhabited areas affected by artificial sky glow3 [url=https://www.robertozappia.it/][b]pandora outlet[/b][/url] water and earth combine with each individual soul and how that combination influences or controls the myriad functions of the body.has helped top business leaders transform strategy into action.

    [url=http://www.storyago.com/bss/member.php?action=profile&uid=41602]msbhwt Use vote to secure reduction on debt burden[/url]
    [url=http://www.sanclick.com/member.php?45724-znlxibms]yeblja Start Your Own Internet Radio Station for Free[/url]
    [url=http://goldenbookssw.com/home.php?mod=space&uid=61958]ejkybs A survey of metadata research for organizing the web[/url]
    [url=http://www.learnflexibledieting.com/community/main-forum/mailing-bossandhall/paged/142/#post-77906]ekkhqg NRA to ramp up gun messaging on cable TV[/url]
    [url=http://ugreshlib.ru/user/Monrealnaw/]rcbsjz How To Copy the Rich to Secure Your Dreams[/url]

发表评论

电子邮件地址不会被公开。 必填项已用*标注