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. Intellij IDEA Debug 多模块下断点目标源问题

    Ctrl+Alt+S进入Settings,选择Debugger->show alternative source switcher 勾选,开启显示替代源选择器 由于项目工程存放了多个应用模块,包 ...

  2. __iter__方法demo

    class Foo(object): def __init__(self,name,data_list): self.name = name self.data_list = data_list de ...

  3. 修复ubuntu 安装mysql后必须使用sudo问题

    修改root用户 查看用户的权限,是否是mysql_native_password,如果不是,则将auth_sock改为mysql_native_password update user set pl ...

  4. Linux题库练习

    转一个Linux的题库供自己学习使用(滑稽) 转自:http://www.linuxdiyf.com/view_202485.html 选择题1 在终端下输入mount -a命令的作用是:CA 强制进 ...

  5. 【转帖】DevOps和SRE的区别

    DevOps和SRE的区别 https://zhuanlan.zhihu.com/p/87598465 DevOps 和 SRE 最近有一位朋友和我聊职业发展方向问题,聊了不少 DevOps 和 SR ...

  6. [WinForm] - 关闭应用时 "has stopped working" 之解决

    背景 关闭 WinForm 应用出现 "has stopped working" 错误. Windows 日志 Faulting application name: PcClien ...

  7. Django框架学习易错和易忘点

    一.get在几处的用法 1.获取前端数据 request.POST.get('xxx') #当存在多个值时,默认取列表最后一个元素:所以当存在多个值时,使用getlist 2.获取数据库数据 mode ...

  8. PAT(B) 1049 数列的片段和(C)规律

    题目链接:1049 数列的片段和 (20 point(s)) 题目描述 给定一个正数数列,我们可以从中截取任意的连续的几个数,称为片段.例如,给定数列 { 0.1, 0.2, 0.3, 0.4 },我 ...

  9. 游记-NOI2019

    Day -18 被各路julao们轮番吊打-- Day -12 鸽子F发布了笔试题库,然而并没有 "MLE全场记零分" 的操作 Day -8 广二体育馆机器装配完毕,误闯开幕式表演 ...

  10. 偶数矩阵 Even Parity,UVa 11464

    题目描述 Description 给你一个n*n的01矩阵(每个元素非0即1),你的任务是把尽量少的0变成1,使得每个元素的上.下.左.右的元素(如果存在的话)之和均为偶数.如图所示的矩阵至少要把3个 ...