Show all keys in redis - in one line
I need to see all available keys in Redis. This question:
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.
You need to do
redis-cli keys '*'
to avoid your shell from expanding * into a list of filenames.