Show all keys in redis - in one line
database, linux, redis
Solution
You need to do
redis-cli keys '*'
to avoid your shell from expanding `*` into a list of filenames.
Problem
I need to see all available keys in Redis. This question: Redis command to get all available keys? Adequately covers the case where I run `redis-cli` with no arguments, then type `keys *`. However, how do I get all keys with a single command? `redis-cli keys *` returns: (error) ERR wrong number of arguments for 'keys' command Even though there are keys set, which checks out if you use the two-command solution.