1、redis基本命令
1.1、获得符合规则的键名称
keys 表达式(?,* ,[],\?)
1.2、判断一个键是否存在
exists key
1.3、删除键
del key
del key1 key2
1.4、批量删除
[root@mycluster redis-3.0.3]# redis-cli del `redis-cli keys "*"`
1.5、获得键值的数据类型type
返回值可能是这五种类型(string,hash,list,set,zset)
注意:redis不区分命令大小写
2.redis的help命令
2.1、"help @<group>" to get a list of commands in <group>
例如: group 通常为string,hash,set,sortet_set,list等
2.2、"help <command>" for help on <command>
例如: command 为set ,get ,hset等
2.3、"help <tab>" to get a list of possible help topics
2.4、"quit" to exit
通过redis-cli连接redis后,help空格后按tab键出来@<group>分组命令,然后help 具体命令

1605

被折叠的 条评论
为什么被折叠?



