redis-cli KEYS 'user:*'

Category: Databases & SQL

redis-cli KEYS 'user:*'

Find keys matching a pattern

KEYS scans every key in the database and blocks the server while it runs — dangerous on production with many keys. Prefer SCAN, which iterates in small non-blocking batches. Related: redis-cli --scan --pattern.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.