您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

redis基础一:帮助文档的查看

2025/3/10 10:25:11发布27次查看
redis 基础 一 redis 基础 一:帮助文档的查看 博客地址:http://blog.lingang.me/2014/03/31/redis-jichu-1/ 1、联上 redis-cli 之后输入 ? 或者 help回车: redis 127.0.0.1:6379 ? redis-cli 2.6.14type: help @group to get a list of commands in group
redis 基础 一redis 基础 一:帮助文档的查看
博客地址:http://blog.lingang.me/2014/03/31/redis-jichu-1/
1、联上 redis-cli 之后输入 “?” 或者 “help”回车:
redis 127.0.0.1:6379> ?
redis-cli 2.6.14type: “help @” to get a list of commands in “help ” for help on
“help ” to get a list of possible help topics
“quit” to exit
从这里可以得到的信息有:输入 help @ 可以查到一组操作的使用,group 为操作的分组,比如 list 为一组操作,hash 为一组操作 server 为一组操作。比如输入 help @hash 能得到处理哈希类型的所有操作的解释以开始支持版本:
redis 127.0.0.1:6379> help @hash
hdel key field [field ...]
summary: delete one or more hash fields
since: 2.0.0
hexists key field
summary: determine if a hash field exists
since: 2.0.0
hget key field
summary: get the value of a hash field
since: 2.0.0
hgetall key
summary: get all the fields and values in a hash
since: 2.0.0
第二行 help 可以查看一个命令的详情,比如输入 help lpop 能查看 lpop 的操作详情:redis 127.0.0.1:6379> help lpop
lpop key
summary: remove and get the first element in a list
since: 1.0.0
group: list
当你不知道有哪些分组和哪些命令时,可以直接输入 help 然后空格然后按 tab 键,会逐一为你列举:redis 127.0.0.1:6379> help @generic
redis 127.0.0.1:6379> help @string
注意:此处以@符开头的能得到一组操作。
当你记不清楚一个命令时,可以输入头一个或几个字符,然后按tab,会逐一为你列举符合以你输入为开头的命令,比如:redis 127.0.0.1:6379> help lpop
redis 127.0.0.1:6379> help lpush
好了,掌握了以上几种用法,已经足以你看遍所有 redis 命令了。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product