https://www.reddit.com/r/redis/comments/atfvqy/how_to_grep_from_monitor_command/

_--------------------------------------------------

  1. the CLI shows the commands as upper-case, so you either need to grep for DEL, or use the -i switch for grep to match both cases

  2. my grep does not handle the | operator unless i specify -E to use extended regular expressions, not sure if this is the case with all greps

So, this should work for you:

redis-cli monitor | grep -iE "del|flush" >> redis-cli.log

 
 
level 2

This didn't work, however ./redis-cli monitor |grep -iE 'del|flush' works. But when i give it to written to a file, it doesn't work

grep redis-cli command的更多相关文章

  1. Redis: OOM command not allowed when used memory > ‘maxmemory

    Redis: OOM command not allowed when used memory > ‘maxmemory’ 解决方式: $ vim /etc/redis/6903.conf ma ...

  2. oozie.log报提示:org.apache.oozie.service.ServiceException: E0104错误 An Admin needs to install the sharelib with oozie-setup.sh and issue the 'oozie admin' CLI command to update sharelib

    不多说,直接上干货! 问题详情 关于怎么启动oozie,我这里不多赘述. Oozie的详细启动步骤(CDH版本的3节点集群) 然后,我在查看 [hadoop@bigdatamaster logs]$ ...

  3. redis cli命令

    redis安装后,在src和/usr/local/bin下有几个以redis开头的可执行文件,称为redis shell,这些可执行文件可做很多事情. 可执行文件 作用 redis-server  启 ...

  4. Redis: OOM command not allowed when used memory > ‘maxmemory’

    现象 日志里出现异常: OOM command not allowed when used memory > 'maxmemory' 原因 内存已满,不允许再存数据了,可以通过redis-cli ...

  5. [redis] redis cli的学习记录

    文档: https://redis.io/topics/rediscli help命令: The command can be used in two forms: . help @<categ ...

  6. AWS CLI command example

    1.list ec2 instance-id, instance status, type, ip address, name aws ec2 describe-instances --query ' ...

  7. aws cli command line interface的安装与使用

    安装 在centos中安装aws cli,安装依赖python,先装好python,然后按下述命令执行 yum install wget wget https://bootstrap.pypa.io/ ...

  8. Redis cli 操作

    备份 root@575e8088b5fb:/data# redis-cli LASTSAVE(integer) 1500273743root@575e8088b5fb:/data# redis-cli ...

  9. -bash: redis: command not found

    在linux中安装redis,先是拉过去安装,然后通过命令:make   进行编译  编译完成以后通过命令 make install 完成安装:结果在进行启动linux的时候执行           ...

  10. Redis安装完后redis-cli无法使用(redis-cli: command not found)

    之前安装redis后客户端无法使用,即redis-cli执行后报找不到的错误.这主要是安装redis的时候没有把客户端装上,在StackOverFlow上找到了一种只安装redis cli的方法,这里 ...

随机推荐

  1. 高级UI-FloatingActionButton

    FloatingActionButton为悬浮按钮,就是常见的那种悬浮在控件上,可以调出其他菜单的按钮 FloatingActionButton的特有属性 app:backgroundTint 按钮的 ...

  2. 捕捉AVPlayerViewController 系统原生工具栏的出现、隐藏事件

    需求前提 1. app内轻量级的视频播放功能,故不希望引入“过度开发.过度封装”的第三方控件组,使用原生的AVPlayerViewController 2. 工具栏有新增控件需求,如下载按钮 等 3. ...

  3. 在ensp上配置通过Telent登录系统

    本实验模拟公司网络场景,路由器R1是公司机房的一台设备,公司员工的办公区 与机房不在同一个楼层,路由器R2和R3模拟员工主机,通过交换机S1与机房设备相 连.为了方便用户的管理,现需要在路由器R1上配 ...

  4. Java调用SqlLoader将大文本导入数据库

    Java调用SqlLoader将大文本导入数据库 业务场景:将一千万条数据,大约500M的文本文档的数据导入到数据库 分析:通过Java的IO流解析txt文本文档,拼接动态sql实现insert入库, ...

  5. c语言实现串

    串  (string)是由零个或者多个字符组成的有限序列,又称字符串 一般表示为 S=“ a1 a2 a3 a4  . . . . . an”    其中S 是串名,双引号串起来的是串值,(有些书用单 ...

  6. go 错误

    错误 Go 程序使用 error 值来表示错误状态. 与 fmt.Stringer 类似,`error` 类型是一个内建接口: type error interface { Error() strin ...

  7. jquery.marquee

    http://aamirafridi.com/jquery/jquery-marquee-plugin#examples <script src="/plugins/marquee/j ...

  8. shell 学习笔记4-shell内置变量命令

    一.shell 的一些内置命令 常用的一内部命令有:echo.eval.exec.export.read.shift 1.echo命令-在屏幕中输出信息 1)说明 格式:echo args #< ...

  9. 雷达无线电系列(三)经典CFAR算法门限因子alpha计算(matlab)

    前言 本文汇集CA.SO.GO.OS.杂波图等恒虚警算法的门限因子求解方法及其函数 1,CA-CFAR [非常简单,可以直接求解] %% 均值恒虚警_门限因子计算公式 %% 版本:v1 %% 时间:2 ...

  10. Extending WCF using IServiceBehavior, IOperationBehavior, and IParameterInspector

    [ServiceContract(Name = "PasswordGenerator")] public interface IPasswordGenerator { [Opera ...