当前位置:网站首页>使用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
原理自己领悟,想想就很容易懂了。
边栏推荐
- C language tutorial (2) - printf and data types that come with c
- npm WARN config global `--global`, `--local` are deprecated. Use `--location解决方案
- CMOS管原理,及其在推挽电路中的应用
- 02 【el和data的两种写法 MVVM模型】
- [Cloud native] Open source data analysis SPL easily copes with T+0
- [Cloud native] Simple introduction and use of microservice Nacos
- Linux modify MySQL database password
- DeFi Token in the project management
- 【云原生】微服务Nacos的简单介绍与使用
- 2021面经-拥抱变化
猜你喜欢
Year-end summary - the years are quiet~
The server time zone value ‘й‘ is unrecognized or represents more than one time zone
Artifact SSMwar exploded Error deploying artifact.See server log for details
leetcode-每日一题剑指 Offer II 041. 滑动窗口的平均值(队列模拟)
【云原生】微服务Nacos的简单介绍与使用
Yuan prospect and four track of the universe
Linux modify MySQL database password
【云原生】开源数据分析 SPL 轻松应对 T+0
初识正则表达式
MySql创建数据表
随机推荐
MySQL compressed package installation, fool teaching
【swagger关闭】生产环境关闭swagger方法
How to distinguish big and small endian in C language
First acquaintance with Flask
MySQL面试题大全(陆续更新)
5 methods of MySQL paging query
对js的数组的理解
Using IIS10 to build an asp website in win11
Object,多态 1(第八天)
[Cloud native] Ribbon is no longer used at the bottom layer of OpenFeign starting from the 2020.0.X version
The latest MySql installation teaching, very detailed
NFT:数字所有权的核心
02 【el和data的两种写法 MVVM模型】
(Crypto essential dry goods) Detailed analysis of the current NFT trading markets
[windows]--- SQL Server 2008 super detailed installation tutorial
Detailed explanation of pointers in C language
Several solutions for mysql startup error The server quit without updating PID file
leetcode-每日一题735. 行星碰撞(栈模拟)
什么是EVM兼容链?
【云原生】SQL(及存储过程)跑得太慢怎么办?