redis show all keys and values code example
Example 1: redis show all keys
$ redis-cli
> KEYS *
1) "title:1"
2) "title:2"
3) "title"
4) "author:2"
5) "author"
6) "author:1"
Example 2: redis show key value
redis> SET mykey "Hello"
"OK"
redis> GET mykey
"Hello"
Example 3: redis scan keys and print values shell
#From shell
redis-cli --raw keys "KeyPrefix*" | xargs redis-cli GET
# or
redis-cli --scan --pattern "KeyPrefix*" | xargs redis-cli GET