redis命令之help帮助命令
2017-01-09 00:00
204 查看
运行redis-cli连接服务器。执行help
127.0.0.1:6379> help
redis-cli 3.2.6
To get help about Redis commands type:
“help @<group>” to get a list of commands in <group>
“help <command>” for help on <command>
“help <tab>” to get a list of possible help topics
“quit” to exit
To set redis-cli perferences:
“:set hints” enable online hints
“:set nohints” disable online hints
Set your preferences in ~/.redisclirc
127.0.0.1:6379>
根据输出可以看到
help命令有三种用法 “help @<group>” to get a list of commands in <group>,”help <command>” for help on <command>,”help <tab>” to get a list of possible help topics
1help @<group> 查看命令组的帮助
help @generic 查看通用组的命令包括del,dump…等等通用命令。 help @string 查看字符串组命令。还可以查看其他组的命令如
help @list, help @set, help @sorted_set,help @hash 等等,查看所有的分组可以通过help <tab>提示。
127.0.0.1:6379> help @generic
DEL key [key …]
summary: Delete a key
since: 1.0.0
DUMP key
summary: Return a serialized version of the value stored at the specified key.
since: 2.6.0
EXISTS key [key …]
summary: Determine if a key exists
since: 1.0.0
EXPIRE key seconds
summary: Set a key’s time to live in seconds
since: 1.0.0
EXPIREAT key timestamp
summary: Set the expiration for a key as a UNIX timestamp
since: 1.2.0
KEYS pattern
summary: Find all keys matching the given pattern
since: 1.0.0
MIGRATE host port key| destination-db timeout [COPY] [REPLACE] [KEYS key]
summary: Atomically transfer a key from a Redis instance to another one.
since: 2.6.0
MOVE key db
summary: Move a key to another database
since: 1.0.0
OBJECT subcommand [arguments [arguments …]]
summary: Inspect the internals of Redis objects
since: 2.2.3
PERSIST key
summary: Remove the expiration from a key
since: 2.2.0
PEXPIRE key milliseconds
summary: Set a key’s time to live in milliseconds
since: 2.6.0
PEXPIREAT key milliseconds-timestamp
summary: Set the expiration for a key as a UNIX timestamp specified in milliseconds
since: 2.6.0
PTTL key
summary: Get the time to live for a key in milliseconds
since: 2.6.0
RANDOMKEY –
summary: Return a random key from the keyspace
since: 1.0.0
RENAME key newkey
summary: Rename a key
since: 1.0.0
RENAMENX key newkey
summary: Rename a key, only if the new key does not exist
since: 1.0.0
RESTORE key ttl serialized-value [REPLACE]
summary: Create a key using the provided serialized value, previously obtained using DUMP.
since: 2.6.0
SCAN cursor [MATCH pattern] [COUNT count]
summary: Incrementally iterate the keys space
since: 2.8.0
SORT key [BY pattern] [LIMIT offset count] [GET pattern [GET pattern …]] [ASC|DESC] [ALPHA] [STORE destination]
summary: Sort the elements in a list, set or sorted set
since: 1.0.0
TTL key
summary: Get the time to live for a key
since: 1.0.0
TYPE key
summary: Determine the type stored at key
since: 1.0.0
WAIT numslaves timeout
summary: Wait for the synchronous replication of all the write commands sent in the context of the current connection
since: 3.0.0
SUBSTR key arg arg arg
summary: Help not available
since: not known
PSYNC arg arg arg
summary: Help not available
since: not known
TOUCH key arg …options…
summary: Help not available
since: not known
LATENCY arg arg …options…
summary: Help not available
since: not known
REPLCONF arg …options…
summary: Help not available
since: not known
PFDEBUG arg arg arg …options…
summary: Help not available
since: not known
ASKING arg
summary: Help not available
since: not known
PFSELFTEST arg
summary: Help not available
since: not known
RESTORE-ASKING key arg arg arg …options…
summary: Help not available
since: not known
127.0.0.1:6379> help @string
APPEND key value
summary: Append a value to a key
since: 2.0.0
BITCOUNT key [start end]
summary: Count set bits in a string
since: 2.6.0
BITFIELD key [GET type offset] [SET type offset value] [INCRBY type offset increment] [OVERFLOW WRAP|SAT|FAIL]
summary: Perform arbitrary bitfield integer operations on strings
since: 3.2.0
BITOP operation destkey key [key …]
summary: Perform bitwise operations between strings
since: 2.6.0
BITPOS key bit [start] [end]
summary: Find first bit set or clear in a string
since: 2.8.7
DECR key
summary: Decrement the integer value of a key by one
since: 1.0.0
DECRBY key decrement
summary: Decrement the integer value of a key by the given number
since: 1.0.0
GET key
summary: Get the value of a key
since: 1.0.0
GETBIT key offset
summary: Returns the bit value at offset in the string value stored at key
since: 2.2.0
GETRANGE key start end
summary: Get a substring of the string stored at a key
since: 2.4.0
GETSET key value
summary: Set the string value of a key and return its old value
since: 1.0.0
INCR key
summary: Increment the integer value of a key by one
since: 1.0.0
INCRBY key increment
summary: Increment the integer value of a key by the given amount
since: 1.0.0
INCRBYFLOAT key increment
summary: Increment the float value of a key by the given amount
since: 2.6.0
MGET key [key …]
summary: Get the values of all the given keys
since: 1.0.0
MSET key value [key value …]
summary: Set multiple keys to multiple values
since: 1.0.1
MSETNX key value [key value …]
summary: Set multiple keys to multiple values, only if none of the keys exist
since: 1.0.1
PSETEX key milliseconds value
summary: Set the value and expiration in milliseconds of a key
since: 2.6.0
SET key value [EX seconds] [PX milliseconds] [NX|XX]
summary: Set the string value of a key
since: 1.0.0
SETBIT key offset value
summary: Sets or clears the bit at offset in the string value stored at key
since: 2.2.0
SETEX key seconds value
summary: Set the value and expiration of a key
since: 2.0.0
SETNX key value
summary: Set the value of a key, only if the key does not exist
since: 1.0.0
SETRANGE key offset value
summary: Overwrite part of a string at key starting at the specified offset
since: 2.2.0
STRLEN key
summary: Get the length of the value stored in a key
since: 2.2.0
2help <command> 查看具体命令的用法
help 具体命令可以查看命令的用法描述,命令从那个版本开始,命令属于哪个组等信息。如 help keys,
127.0.0.1:6379> help keys
KEYS pattern
summary: Find all keys matching the given pattern
since: 1.0.0
group: generic
127.0.0.1:6379>
3help <tab> help后面参数提示补全
help 之后按tab按键可提示参数。在命令行下 tab按键相信是用的最多的一个按键。
help空格之后一直按tab,可按顺序查看到所有可能的组和命令。也可输入需要查询的@组或命令的前缀再按tab补全。
转载请注明:求索路 » redis命令之help帮助命令
127.0.0.1:6379> help
redis-cli 3.2.6
To get help about Redis commands type:
“help @<group>” to get a list of commands in <group>
“help <command>” for help on <command>
“help <tab>” to get a list of possible help topics
“quit” to exit
To set redis-cli perferences:
“:set hints” enable online hints
“:set nohints” disable online hints
Set your preferences in ~/.redisclirc
127.0.0.1:6379>
根据输出可以看到
help命令有三种用法 “help @<group>” to get a list of commands in <group>,”help <command>” for help on <command>,”help <tab>” to get a list of possible help topics
1help @<group> 查看命令组的帮助
help @generic 查看通用组的命令包括del,dump…等等通用命令。 help @string 查看字符串组命令。还可以查看其他组的命令如
help @list, help @set, help @sorted_set,help @hash 等等,查看所有的分组可以通过help <tab>提示。
127.0.0.1:6379> help @generic
DEL key [key …]
summary: Delete a key
since: 1.0.0
DUMP key
summary: Return a serialized version of the value stored at the specified key.
since: 2.6.0
EXISTS key [key …]
summary: Determine if a key exists
since: 1.0.0
EXPIRE key seconds
summary: Set a key’s time to live in seconds
since: 1.0.0
EXPIREAT key timestamp
summary: Set the expiration for a key as a UNIX timestamp
since: 1.2.0
KEYS pattern
summary: Find all keys matching the given pattern
since: 1.0.0
MIGRATE host port key| destination-db timeout [COPY] [REPLACE] [KEYS key]
summary: Atomically transfer a key from a Redis instance to another one.
since: 2.6.0
MOVE key db
summary: Move a key to another database
since: 1.0.0
OBJECT subcommand [arguments [arguments …]]
summary: Inspect the internals of Redis objects
since: 2.2.3
PERSIST key
summary: Remove the expiration from a key
since: 2.2.0
PEXPIRE key milliseconds
summary: Set a key’s time to live in milliseconds
since: 2.6.0
PEXPIREAT key milliseconds-timestamp
summary: Set the expiration for a key as a UNIX timestamp specified in milliseconds
since: 2.6.0
PTTL key
summary: Get the time to live for a key in milliseconds
since: 2.6.0
RANDOMKEY –
summary: Return a random key from the keyspace
since: 1.0.0
RENAME key newkey
summary: Rename a key
since: 1.0.0
RENAMENX key newkey
summary: Rename a key, only if the new key does not exist
since: 1.0.0
RESTORE key ttl serialized-value [REPLACE]
summary: Create a key using the provided serialized value, previously obtained using DUMP.
since: 2.6.0
SCAN cursor [MATCH pattern] [COUNT count]
summary: Incrementally iterate the keys space
since: 2.8.0
SORT key [BY pattern] [LIMIT offset count] [GET pattern [GET pattern …]] [ASC|DESC] [ALPHA] [STORE destination]
summary: Sort the elements in a list, set or sorted set
since: 1.0.0
TTL key
summary: Get the time to live for a key
since: 1.0.0
TYPE key
summary: Determine the type stored at key
since: 1.0.0
WAIT numslaves timeout
summary: Wait for the synchronous replication of all the write commands sent in the context of the current connection
since: 3.0.0
SUBSTR key arg arg arg
summary: Help not available
since: not known
PSYNC arg arg arg
summary: Help not available
since: not known
TOUCH key arg …options…
summary: Help not available
since: not known
LATENCY arg arg …options…
summary: Help not available
since: not known
REPLCONF arg …options…
summary: Help not available
since: not known
PFDEBUG arg arg arg …options…
summary: Help not available
since: not known
ASKING arg
summary: Help not available
since: not known
PFSELFTEST arg
summary: Help not available
since: not known
RESTORE-ASKING key arg arg arg …options…
summary: Help not available
since: not known
127.0.0.1:6379> help @string
APPEND key value
summary: Append a value to a key
since: 2.0.0
BITCOUNT key [start end]
summary: Count set bits in a string
since: 2.6.0
BITFIELD key [GET type offset] [SET type offset value] [INCRBY type offset increment] [OVERFLOW WRAP|SAT|FAIL]
summary: Perform arbitrary bitfield integer operations on strings
since: 3.2.0
BITOP operation destkey key [key …]
summary: Perform bitwise operations between strings
since: 2.6.0
BITPOS key bit [start] [end]
summary: Find first bit set or clear in a string
since: 2.8.7
DECR key
summary: Decrement the integer value of a key by one
since: 1.0.0
DECRBY key decrement
summary: Decrement the integer value of a key by the given number
since: 1.0.0
GET key
summary: Get the value of a key
since: 1.0.0
GETBIT key offset
summary: Returns the bit value at offset in the string value stored at key
since: 2.2.0
GETRANGE key start end
summary: Get a substring of the string stored at a key
since: 2.4.0
GETSET key value
summary: Set the string value of a key and return its old value
since: 1.0.0
INCR key
summary: Increment the integer value of a key by one
since: 1.0.0
INCRBY key increment
summary: Increment the integer value of a key by the given amount
since: 1.0.0
INCRBYFLOAT key increment
summary: Increment the float value of a key by the given amount
since: 2.6.0
MGET key [key …]
summary: Get the values of all the given keys
since: 1.0.0
MSET key value [key value …]
summary: Set multiple keys to multiple values
since: 1.0.1
MSETNX key value [key value …]
summary: Set multiple keys to multiple values, only if none of the keys exist
since: 1.0.1
PSETEX key milliseconds value
summary: Set the value and expiration in milliseconds of a key
since: 2.6.0
SET key value [EX seconds] [PX milliseconds] [NX|XX]
summary: Set the string value of a key
since: 1.0.0
SETBIT key offset value
summary: Sets or clears the bit at offset in the string value stored at key
since: 2.2.0
SETEX key seconds value
summary: Set the value and expiration of a key
since: 2.0.0
SETNX key value
summary: Set the value of a key, only if the key does not exist
since: 1.0.0
SETRANGE key offset value
summary: Overwrite part of a string at key starting at the specified offset
since: 2.2.0
STRLEN key
summary: Get the length of the value stored in a key
since: 2.2.0
2help <command> 查看具体命令的用法
help 具体命令可以查看命令的用法描述,命令从那个版本开始,命令属于哪个组等信息。如 help keys,
127.0.0.1:6379> help keys
KEYS pattern
summary: Find all keys matching the given pattern
since: 1.0.0
group: generic
127.0.0.1:6379>
3help <tab> help后面参数提示补全
help 之后按tab按键可提示参数。在命令行下 tab按键相信是用的最多的一个按键。
help空格之后一直按tab,可按顺序查看到所有可能的组和命令。也可输入需要查询的@组或命令的前缀再按tab补全。
转载请注明:求索路 » redis命令之help帮助命令
相关文章推荐
- Pedis: NoSQL data store using the SEASTAR framework, compatible with Redis
- 10 篇对初学者和专家都有用的 Linux 命令教程
- redis安装问题小结
- nosql
- 设计模式之行为型模式 - 调用行为的传递问题
- spring中Redis的集群简单实现
- 常用文本编辑命令
- linux mknod命令与磁盘对应一例
- 使用 Redis 和 Python 构建一个共享单车的应用程序
- Redis偶发连接失败案例实战记录
- 通晓网络测试常用命令
- FTP命令大全
- Netsh.exe 工具和命令行开关说明
- Ruby基本的环境变量设置以及常用解释器命令介绍
- Vue概念及常见命令介绍(1)
- Oracle数据库执行脚本常用命令小结
- set 命令特殊用法
- PowerShell重启服务命令Restart-Service详细介绍