database - 在一行中显示 redis 中的所有键

标签 database linux redis

我需要查看 Redis 中所有可用的键。这个问题:

Redis command to get all available keys?

充分涵盖了我不带参数运行 redis-cli,然后键入 keys * 的情况。

但是,如何使用一个命令获取所有 key ?

redis-cli keys * 返回:

(error) ERR wrong number of arguments for 'keys' command

即使设置了 key ,它也会检查您是否使用双命令解决方案。

最佳答案

你需要做的

redis-cli keys '*'

避免您的 shell 将 * 扩展为文件名列表。

关于database - 在一行中显示 redis 中的所有键,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12119075/

相关文章:

python - 使用 get_or_create 是否正确?

database - 为什么 npx prisma db Push 找不到我的 prisma 架构?

java - 如何传递连接代码?

mysql - Redis : Is it possible to get filtered data by any field stored in Redis?

android - 整理 list h2数据库

c - 使用 NCurses 获取 CTRL 字符

c - fatal error : addFunc. h:没有那个文件或目录

linux - 已解决 : PAM module bash script on sudo breaks Zenity -/bin/bash failed: exit code 126 -/bin/bash failed: exit code 126

memory - Redis+Resque : Which maxmemory-policy for using redis with Resque?

redis - 获取redis中存在的所有哈希值