Redis provides rich commands for manipulating databases and various database types that can be used on Linux endpoints.
1. Key-Value related commands
(1)keys
Returns all keys that satisfy a given parameter
With an expression *, the delegate takes out all keys
(2)exists
Confirm if a key exists
1 means present, 0 means no
(3)expire
Set the expiration time for a key
(4)move:
Transfers the key from the current database to a different database.
Select the syntax for the database:
number of the Select database
The syntax for moving:
Move key target database number
(5)persist
Remove the expiration time for a given key
(6)Randomkey
Randomly returns a key in the key space
(4)move:
Transfers the key from the current database to a different database.
Select the syntax for the database:
number of the Select database
The syntax for moving:
Move key target database number
(5)persist
Remove the expiration time for a given key
(6)Randomkey
Randomly returns a key in the key space
(7)Rename
Rename Key
Syntax : Rename the original key name after the modified key name
(8)type: Types of return values
2. Server-related commands
(1)Select
Select the database. Redis database number from 0-15, we can select any database for data access.
When selecting 16 o'clock, an error indicates that there is no database numbered 16.
(2)quit (exit)
Exit connection
(3)dbsize
Returns the number of keys in the current database
(4)info
Gets the information and statistics of the server.
(5)config get
Gets the configuration of the parameter.
In this example, we get the value of the dir parameter configuration, and if you want to get the configuration of all the parameters simply execute "config get *" To display all the values.
(6)flushdb
Remove all keys from the currently selected database and use them sparingly in the real world
(7)Flushall
Remove all keys from all databases in the real world, use them with caution.
Kill lui lei Dog---php developing redis---3-redis common commands