[Redis] Command in redis

1. Access redis-cli

redis-cli -p <port>

2. Show keys

keys *  // all key
keys "*abc*" // keys contain abc

3. Delete key

// each key
del key1 key2

Example: 

We have keys:

1) “ab:1”

2) “ab:2”

3) “ab:3”

// multiple key with text ab
EVAL "return redis.call('del', unpack(redis.call('keys', ARGV[1])))" 0 ab:*
Advertisements