``` redis-query 0.1.8 Searches keys in multiple Redis' databases
USAGE:
redis-query [FLAGS] [OPTIONS]
FLAGS: -e, --easy-search When the "easy search" is enabled the query will match all the keys that includes the give string (case-insensitive) --help Prints help information -t, --show-ttl Shows the values associated with the keys -v, --show-value Shows the values associated with the keys -V, --version Prints version information
OPTIONS:
-d, --db
ARGS:
Assuming that Redis contains 2 databases with the following content:
Database 0
Key | Value --- | ----- aThing | Derby Rambla person12 | luca person23 | anna something | a value
Database 1
Key | Value --- | ----- somethingelse | another value Bookmarks97 | https://github.com/lucapinelli/redis-query Bookmarks163 | https://redis.io/commands#generic bookmarkscount | 2
To get the keys in all the databases:
$ redis-query "*"
DB(0) aThing, person_12, person_23, something
DB(1) Bookmarks_97, Bookmarks_163, something_else, bookmarks_count
To search, in all the databases, the keys that matches the pattern 'something*':
bash
$ redis-query "something*"
DB(0) something
DB(1) something_else
To show the values associated with the keys:
bash
$ redis-query -v "something*"
DB(0) something = a value
DB(1) something_else = another value
To search the keys only in the database 1:
bash
$ redis-query --db 1 "something*"
DB(1) something_else
To search the keys that contains "bookmark" (case insensitive):
bash
$ redis-query -e "bookmark"
DB(1) Bookmarks_97, Bookmarks_163, bookmarks_count
bash
cargo install redis-query