这一篇我们一起来学习下key的基本操作,这些操作虽说在高级语言当中都被做了进一步封装,但是对于运维人员来说还是很有必要掌握的。
我是T型人小付,一位坚持终身学习的互联网从业者。喜欢我的博客欢迎在csdn上关注我,如果有问题欢迎在底下的评论区交流,谢谢。
准备条件
redis命令都是在成功连接到redis服务的客户端上执行,这里还是采用前几篇使用的单机演示环境
[root@testmachine bin]# ./redis-cli -a xiaofu
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
127.0.0.1:6379>
帮助信息和清屏
帮助信息的查看格式如下
127.0.0.1:6379> help
redis-cli 5.0.7
To get help about Redis commands type:
"help @<group>" to get a list of commands in <group>
"help <command>" for help on <command>
"help <tab>" to get a list of possible help topics
"quit" to exit
To set redis-cli preferences:
":set hints" enable online hints
":set