Enumeration function of various data sets of redis

There are many data sets under a db0, which are called keys in redis, and each key can have a lot of data.

Then the command to list all the data in each key is as follows:


------------------------------- Below is the list of functions --------------- --------------------------------
List all data sets in db0 (data sets are called keys)
127.0.0.1: 6379> keys *
1) "myhash"
2) "set1"
3) "_kombu.binding.celeryev"
4) "data_list"
5) "data_string"
6) "_kombu.binding.celery"
7) "_kombu.binding.celery .pidbox"
8) "db_number"
-------------------------------------------- ------------------------------------
List all data in the specified collection:
127.0.0.1:6379> SMEMBERS set1
1) "redis"
2) "mongodb"
127.0.0.1:6379>
-------------------------------------------------- ----------------------------
List all data in the specified hash table:
127.0.0.1:6379> HGETALL myhash
1) "field1"
2) "Hello"
3) "field2"
4) "World"
------------------------------ ------------------------------------------------
list designation All data in list:
127.0.0.1:6379> LRANGE data_list 0 10
1) "rabbitmq"
2) "haha"
3) "redis"
127.0.0.1:6379> 


-------------- -------------------------------------------------- --------------
List all strings in the specified key
127.0.0.1:6379> get data_string
"yuchi"

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325985883&siteId=291194637