当前位置:网站首页>redis相关
redis相关
2022-07-28 20:50:00 【积分中值定理】
1.查找redis安装路径
whereis redis
2.切换到redis脚本目录,登录redis
./redis-cli -h xxx.xxx.xxx.xx -p xxxx
3.查看当前数据库key的数量,执行:dbsize命令
(如果出现(error) ERR unknown command ‘(error)’ ,输入auth 密码 )
4.auth 密码
5.查看所有key值
keys *
查看可能key值(正则)
keys abc* -通配任意多个字符,abcd,abcdefg都能查到
keys h?llo -通配单个字符,hello/hallo
keys a[bc]ple -[]通配括号内的某个字符,要么abple,要么acple,不可以aple
keys a[a-b-c]ple -相当于or,匹配a/b/c
keys a[^f]ple -匹配f之前的字母
配合使用
keys h[a-b-c]*llo:匹配ha(任意多)llo, 或者hb(任意多)llo, 或者hc(任意多)llo
6.删除指定索引的值:del key
6.1(邪术)批量删除指定前缀key值。此操作需要先退出redis库,利用Linux的管道命令实现
./redis-cli -h xx.xx.xx.xx -a "密码写在引号里" keys "条件*" | xargs ./redis-cli -h xx.xx.xx.xx -a "密码写在引号里" del
7.清空整个 Redis 服务器的数据:flushall
8.清空当前库中的所有 key:flushdb
9、退出:exit;
边栏推荐
- PaddleNLP基于ERNIR3.0文本分类以CAIL2018-SMALL数据集罪名预测任务为例【多标签】
- elment-plus图标input上面带的图标为什么不显示
- tutorial/detailed_ workflow. Ipynb quantitative finance qlib Library
- Hcip experiment (14)
- Hcip experiment (12)
- 使用webWorker执行后台任务
- HCIP(8)
- Sword finger offer II 067. maximum XOR (medium prefix tree bit operation array)
- [Ruiji takeout] day05 package management business development
- Jmeter 安装第三方插件 Plugins Manager
猜你喜欢

Ngrok intranet penetration

MySQL built-in functions
![[CS231N]Lecture_2:Image Classification pipelin](/img/4f/de56b071560ada746c587a9dbc5f02.jpg)
[CS231N]Lecture_2:Image Classification pipelin

96. Different binary search trees (medium binary search tree dynamic planning)

LVS+KeepAlived高可用部署实战应用

基于Ernie-3.0 CAIL2019法研杯要素识别多标签分类任务

HCIP(8)

静态成员static详解

ATT&CK 威胁情报

MySQL installation and configuration (super detailed, simple and practical)
随机推荐
HCIP(12)
tutorial/detailed_ workflow. Ipynb quantitative finance qlib Library
75. Color classification (medium array double pointer sorting)
Common commands of NPM
Ecmasript 5/6 notes
Sword finger offer II 063. replacement word (medium prefix tree string)
Win11怎么打开软件通知
When can I sign up for the 2022 class I constructor examination?
Use webworker to perform background tasks
Necessary for in-depth learning: split the data set, split the labels according to the split pictures, and check the interval of all marked labels
HCIP(15)
LCR测试仪最为主要的功能和用途都是什么
2021 mathematical modeling group B exercise
If you want to grow rapidly, you must first experience a major blow!
成立不到一年!MIT衍生量子计算公司完成900万美元融资
Static details of static members
[CS231N]Lecture_ 2:Image Classification pipelin
elment-plus图标input上面带的图标为什么不显示
MOV格式是不是静态图像文件格式
软考网络工程师