当前位置:网站首页>When grep looks for a process, it ignores the grep process itself
When grep looks for a process, it ignores the grep process itself
2022-07-07 01:40:00 【Channing Lewis】
ps -ef | grep ' Process name ' | grep -v grep
grep -v grep That is, the removal result contains grep The process of .
But be careful if your process name contains grep It's also ignored .
At this time, we need more detailed rules , For example, add a space in the removal condition :
ps -ef | grep ' Process name ' | grep -v 'grep '
because grep The process is based on grep+ Beginning with a space , The general process will not be like this , So we can distinguish .
If you can't distinguish, you can consider grep -v Supported regular expression writing , No more details here .( Because it's so rare )
边栏推荐
- According to the analysis of the Internet industry in 2022, how to choose a suitable position?
- dvajs的基础介绍及使用
- Add the applet "lazycodeloading": "requiredcomponents" in taro,
- 鼠标右键 自定义
- 405 method not allowed appears when the third party jumps to the website
- JS es5 peut également créer des constantes?
- JVM 内存模型
- AcWing 1140. 最短网络 (最小生成树)
- Appium foundation - appium inspector positioning tool (I)
- ZOJ problem set – 2563 long dominoes [e.g. pressure DP]
猜你喜欢
随机推荐
ZOJ problem set – 2563 long dominoes [e.g. pressure DP]
go-zero微服务实战系列(九、极致优化秒杀性能)
JS ES5也可以创建常量?
AcWing 346. Solution to the problem of water splashing festival in the corridor (deduction formula, minimum spanning tree)
Use nodejs to determine which projects are packaged + released
使用nodejs完成判断哪些项目打包+发版
今日问题-2022/7/4 lambda体中修改String引用类型变量
C language instance_ five
Gin 入门实战
Vocabulary in Data Book
Gazebo的安装&与ROS的连接
THREE. AxesHelper is not a constructor
AcWing 1141. LAN problem solving (kruskalkruskal finding the minimum spanning tree)
Send template message via wechat official account
【芯片方案设计】脉搏血氧仪
swiper组件中使用video导致全屏错位
黑马笔记---创建不可变集合与Stream流
Appium automation test foundation uiautomatorviewer positioning tool
云呐|工单管理办法,如何开展工单管理
修改px4飞控的系统时间