当前位置:网站首页>使用ps | egrep时过滤排除掉egrep自身
使用ps | egrep时过滤排除掉egrep自身
2022-07-31 05:11:00 【tcliuwenwen】
博文背景
[email protected]:/usr/local/redis-7.0.3# ps -ef | egrep redis
root 1815199 1 0 00:00 ? 00:01:28 ./src/redis-server 127.0.0.1:6379
root 1997222 1996120 0 19:23 pts/2 00:00:00 grep -E --color=auto redis
这个很丑陋,看着不习惯
[email protected]:/usr/local/redis-7.0.3# ps -ef | egrep redis | egrep -v grep
root 1815199 1 0 00:00 ? 00:01:28 ./src/redis-server 127.0.0.1:6379
这个很麻烦,看着不习惯
解决办法
% ps -ef | egrep "[r]edis"
[email protected]:/usr/local/redis-7.0.3# ps -ef | egrep "[r]edis"
root 1815199 1 0 00:00 ? 00:01:28 ./src/redis-server 127.0.0.1:6379
原理自己领悟,想想就很容易懂了。
边栏推荐
- The latest MySql installation teaching, very detailed
- leetcode-2321. 拼接数组的最大分数(差分+枚举)
- 2021面经-拥抱变化
- 永恒之蓝漏洞复现
- [uiautomation] Get WeChat friend list (stored in txt)
- 通信原理——纠错编码 | 汉明码(海明码)手算详解
- C language tutorial (2) - printf and data types that come with c
- Volatility取证工具使用日记
- 闭包(五)----一个常见的循环
- 【ubuntu20.04安装MySQL以及MySQL-workbench可视化工具】
猜你喜欢
随机推荐
【云原生】SQL(及存储过程)跑得太慢怎么办?
闭包(五)----一个常见的循环
Take you to understand the MySQL isolation level, what happens when two transactions operate on the same row of data at the same time?
Error: Cannot find module 'D:\Application\nodejs\node_modules\npm\bin\npm-cli.js'
leetcode-每日一题565. 数组嵌套(标记图和并查集)
MySQL高级语句(一)
What is the difference between NFT and digital collection?
Object,多态 1(第八天)
数据库 | SQL查询进阶语法
Getting to know regular expressions
MySQL-如何分库分表?一看就懂
mysql启动报错The server quit without updating PID file几种解决办法
2021面经-拥抱变化
代码块、Package,Import,封装(第六天)
C language tutorial (2) - printf and data types that come with c
Oracle数据库中的“limit”查询
NFT:数字所有权的核心
11 【组件通信】
10 【组件编码流程 组件自定义事件 全局事件总线】
[Elastic-Job] Overview of Distributed Scheduling Tasks








![[Elastic-Job source code analysis] - job listener](/img/99/5e047b1aa83aad7d7f17b4eec606e6.png)
