当前位置:网站首页>使用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
原理自己领悟,想想就很容易懂了。
边栏推荐
- 08 【生命周期 组件】
- Understanding SSRF, this article is enough
- [windows]--- SQL Server 2008 super detailed installation tutorial
- [Elastic-Job] Overview of Distributed Scheduling Tasks
- 【云原生】原来2020.0.X版本开始的OpenFeign底层不再使用Ribbon了
- Redis:简单实用
- (Crypto essential dry goods) Detailed analysis of the current NFT trading markets
- MySQL高级语句(一)
- 初识正则表达式
- leetcode-1833. 雪糕的最大数量(排序+贪心)
猜你喜欢

leetcode-829. 连续整数求和(数论)

The MySQL database in Alibaba Cloud was attacked, and the data was finally recovered

Year-end summary - the years are quiet~

【Elastic-Job源码分析】——作业监听器

计网 Packet Tracer仿真 | 简单易懂集线器和交换机对比(理论+仿真)

元宇宙的前景及四大赛道

数字孪生将成为进入“元宇宙”一项重要的途径
![[windows]--- SQL Server 2008 super detailed installation tutorial](/img/b7/dc802c63b07edc4298b6e6b90d865c.png)
[windows]--- SQL Server 2008 super detailed installation tutorial

10 【组件编码流程 组件自定义事件 全局事件总线】

Take you to understand the MySQL isolation level, what happens when two transactions operate on the same row of data at the same time?
随机推荐
For penetration testing methods where the output point is a timestamp (take Oracle database as an example)
05 【绑定样式 条件渲染 列表渲染】
Redis:简单实用
leetcode-每日一题735. 行星碰撞(栈模拟)
数字孪生将成为进入“元宇宙”一项重要的途径
C语言 | 获取字符串里逗号间隔的内容
Error: Cannot find module 'D:\Application\nodejs\node_modules\npm\bin\npm-cli.js'
Regular Expression Basics
数据库 | SQL增删改查基础语法
[Ubuntu20.04 installs MySQL and MySQL-workbench visualization tool]
11 【定位】
MySQL错误-this is incompatible with sql_mode=only_full_group_by完美解决方案
安装Multisim出现 No software will be installed or removed解决方法
代码块、Package,Import,封装(第六天)
【windows】--- SQL Server 2008 超详细安装教程
变量的解构赋值
5 methods of MySQL paging query
The MySQL database in Alibaba Cloud was attacked, and the data was finally recovered
Memcached :安装
【Elastic-Job源码分析】——作业监听器