scan and print all keys redis shell code example
Example 1: scan and print all keys redis shell
# From shell
redis-cli --raw keys "KeyPrefix*"
# or
redis-cli --scan --pattern "KeyPrefix*"
Example 2: 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