当前位置:网站首页>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 )
边栏推荐
- js如何快速创建一个长度为 n 的数组
- Drag to change order
- JS es5 peut également créer des constantes?
- Add the applet "lazycodeloading": "requiredcomponents" in taro,
- 修改px4飞控的系统时间
- 今日问题-2022/7/4 lambda体中修改String引用类型变量
- The difference between Tansig and logsig. Why does BP like to use Tansig
- Using the entry level of DVA in taro3.*
- 736. LISP syntax parsing: DFS simulation questions
- ClickHouse字段分组聚合、按照任意时间段粒度查询SQL
猜你喜欢
随机推荐
交叉验证如何防止过拟合
736. Lisp 语法解析 : DFS 模拟题
从零开始匹配vim(0)——vimscript 简介
C语言关于链表的代码看不懂?一篇文章让你拿捏二级指针并深入理解函数参数列表中传参的多种形式
Long press the button to execute the function
uva 1401 dp+Trie
Gin introduction practice
域分析工具BloodHound的使用说明
C language instance_ three
c语言—数组
Amway wave C2 tools
[advanced C language] 8 written questions of pointer
Match VIM from zero (0) -- Introduction to vimscript
According to the analysis of the Internet industry in 2022, how to choose a suitable position?
Clickhouse fields are grouped and aggregated, and SQL is queried according to the granularity of any time period
糊涂工具类(hutool)post请求设置body参数为json数据
公钥\私人 ssh避password登陆
C language instance_ two
7.6模拟赛总结
Right mouse button customization