Subscribe to a channel
Subscribe to a channel and listen for messages
redis-cli SUBSCRIBE events
More redis commands
-
redis-cli INFO replicationShow the role, connected replicas and replication lag
-
redis-cli BGSAVE && redis-cli LASTSAVEStart a background RDB save and print the last save time (it changes only when BGSAVE finishes)
-
redis-cli -n 1 FLUSHDB ASYNCDelete all keys in database 1 only, in the background
-
redis-cli ZREVRANGEBYSCORE leaderboard +inf -inf WITHSCORES LIMIT 0 10Show the top 10 entries of a sorted set with their scores
-
redis-cli XADD mystream '*' event login user aliceAdd a message to a Redis Stream with an auto-generated ID