One, key operation (keys)
DEL KEY [KEY&NBSP, ...] Delete the value of a keydump key export key exists key [key ...] Queries whether a key exists expire key seconds sets the number of expired seconds for a key expireat key timestamp Set the expiration time of a UNIX timestamp keys pattern find all keys that match the given pattern migrate host port key destination-db timeout [COPY] [REPLACE] atomically moves the key from one instance of Redis to another instance move key db Move one key to another database object subcommand [arguments [arguments ...] Check the internal Redistribution object persist key Remove key expiration Time pexpire key milliseconds Set the effective time of key in milliseconds pexpireat key milliseconds-timestamp set the expiration of the key for the Unix timestamp in milliseconds pttl key Gets the effective number of milliseconds for key randomkey returns a random keyrename key newkey renaming a key Renamenx key newkey Rename a key, the new key must be non-existent keyrestore key ttl serialized-value [replace] create a key using the provided serialized value, previously Obtained using dump. Sort key [by pattern] [limit offset count] [get pattern [get  PATTERN&NBSP, ...] [asc| desc] [alpha] [store destination] the queue, collection, ordered collection ttl key the valid time (in seconds) to get the key key get the storage type of key wait numslaves timeout wait for the synchronous Replication of all the write commands sent in the context of the current connectionSCAN cursor [MATCH pattern] [COUNT count] Incremental Iteration Key
Second, server operation (server)
bgrewriteaof asynchronously rewrites the Append file command bgsave asynchronously saves the dataset to disk Client kill [ip:port] [id client-id] [TYPE normal|slave|pubsub] [ADDR ip:port] [SKIPME yes/no] shut down Client connection clients LIST get a list of client connections client getname get the current connection name client pause timeout pause processing Client commands SETNAME connection-name set the name of the current connection Command get array of redis command detailsCOMMAND COUNT Get total number of Redis commandsCOMMAND getkeys extract keys given a full redis commandcommand info COMMAND-NAME [COMMAND-NAME&NBSP, ...] get array of specific redis command detailsconfig get parameter Get the value of the configuration parameter config rewrite from the write in-memory configuration file config set parameter value set config file config RESETSTAT Reset redistribution using the info command to report statistics dbsize returns the number of keys in the current database Debug object key Gets the debug information for a key debug segfault the server crashes command flushall clears all database commands flushdb empties the current database command info [ section] get the details of the server lastsave get the last synchronized disk Time monitor real-time monitoring server Role return the role of the instance in the context of replicationSAVE Synchronize data to disk shutdown [nosave] [save] shutdown service slaveof host port Specify the primary server for the current server slowlog subcommand [argument] Manage Redistribution Slow query log sync internal command for replication time returns the current server time
Three, string manipulation (strings)
append key value appends a value to the bitcount key [start end] statistic string on the key to specify the number of bytes from the starting position bitop  OPERATION DESTKEY KEY [KEY&NBSP, ...] perform bitwise operations between stringsbitpos key bit [start] [end] find first bit set or clear in a stringdecr key integer atom minus 1decrby key decrement atom minus the specified integer get key returns the valuegetbit key of key The value of the offset return bit is stored at the offset of the key string value. getrange key start end gets a substring of the value stored on the key getset key value sets a key and gets the value before the set incr key performs an atomic plus 1 operation incrby key increment the atomic increment of an integer incrbyfloat key increment execution atoms Add a floating-point number mget key [key Get the value of all keys mset key value [key value  ...] set multiple key valuemsetnx key value [key value ...] Set multiple key value, only if key exists Psetex key millisEconds value set the value and expiration in milliseconds of a keyset key value [ex seconds] [px milliseconds] [nx| xx] sets the value of a key setbit key offset value sets or clears the bit at offset in the string value stored at keySETEX key seconds value set Key-value and set the expiration time (in seconds) setnx key value set a key value only if the key does not exist SetRange key offset value Overwrite part of a string at key starting at the specified offsetstrlen key gets the length of the specified key value
four, cluster operations (cluster)
CLUSTER ADDSLOTS SLOT [SLOT&NBSP, ...] assign new hash slots to receiving nodecluster count-failure-reports node-id return the number of failure reports active for a given nodeCLUSTER COUNTKEYSINSLOT slot Return the number of Local keys in the specified hash slotcluster delslots slot [slot &NBSP, ...] set hash slots as unbound in receiving nodecluster failover [force| Takeover] forces a slave to perform a manual failover of its master. Cluster forget node-id remove a node from the nodes tablecluster GETKEYSINSLOT slot count Return local key names in the Specified hash slotcluster info&nbsP provides info about redis cluster node statecluster keyslot key returns the hash slot of the specified keycluster meet ip Port force a node cluster to handshake with another nodecluster nodes get cluster config for the nodecluster replicate node-id Reconfigure a node as a slave of the specified master nodecluster reset [hard| soft] reset a redis cluster nodecluster saveconfig forces the node to save cluster state on diskcluster set-config-epoch config-epoch set the configuration epoch in a new nodecluster Setslot slot importing| Migrating| stable| node [node-id] bind an hash slot&Nbsp;to a specific nodecluster slaves node-id list slave nodes of the specified master nodecluster slots get array of cluster slot to node mappingsREADONLY Enables read queries for a Connection to a cluster slave nodereadwrite disables read queries for a connection to a cluster slave node
Redis Command Daquan