当前位置:网站首页>使用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
原理自己领悟,想想就很容易懂了。
边栏推荐
猜你喜欢
随机推荐
For penetration testing methods where the output point is a timestamp (take Oracle database as an example)
元宇宙的前景及四大赛道
leetcode-每日一题565. 数组嵌套(标记图和并查集)
On the side of Ali, tell me what are the application scenarios of message middleware you know?
gin框架学习-Casbin入门指南(ACL、RBAC、域内RBAC模型)
How MySQL - depots table?A look at will understand
带你搞懂MySQL隔离级别,两个事务同时操作同一行数据会怎样?
MySQL高级学习笔记
leetcode-1833. 雪糕的最大数量(排序+贪心)
PHP中abstract(抽象)、final(最终)和static(静态)原理与用法
数据库 | SQL查询进阶语法
[Cloud native] Ribbon is no longer used at the bottom layer of OpenFeign starting from the 2020.0.X version
闭包(五)----一个常见的循环
Error: Cannot find module 'D:\Application\nodejs\node_modules\npm\bin\npm-cli.js'
对js的数组的理解
vulhub靶场学习日记SickOs1.2
常见JVM面试题及答案整理
sqlmap injection tutorial common commands
win11中利用IIS10搭建asp网站
sqlmap注入教程 常用指令









