全局操作:
查看所有key
keys * 或 keys "*"
查看匹配前綴的keys
keys "miao"
keys "logisticsservice:freight:template"
keys "logisticsservice:freight:config"
keys "logisticsservice:freight:commodityid"
//刪除當(dāng)前數(shù)據(jù)庫(kù)中的所有Key
flushdb
//刪除所有數(shù)據(jù)庫(kù)中的key
flushall
隨機(jī)取出一個(gè)key
randomkey
查看key的類型
type key
查看數(shù)據(jù)庫(kù)中key的數(shù)量
dbsize
查看服務(wù)器信息
info
查看redis正在做什么
monitor
查看日志
slowlog get