Show all keys in redis - in one line

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.

Answers


You need to do

redis-cli keys '*'

to avoid your shell from expanding * into a list of filenames.


Need Your Help

Unable to install MySQL2 gem on Windows 7

ruby-on-rails ruby rubygems mysql2

I am getting the following error message while installing, let me know if I need to post more details.

Functions vs procedures in Oracle

oracle stored-procedures plsql oracle11g stored-functions

can anybody explain what is the main difference between functions and procedures in Oracle? Why must I use procedures if I can do everything with functions?