ps aux | grep 无法过滤点号
时间: 2023-02-12 10:19:54 浏览: 170
"ps aux | grep" 命令是用来查看进程信息的。"grep" 命令可以用来过滤出包含特定字符串的行。但是,该命令不能用来过滤点号,因为点号是进程的一部分,而不是进程信息的一部分。你可以用其他命令来筛选点号,比如 awk,sed 或者 其他方式。
相关问题
ps aux | grep -v | grep job
`ps aux | grep -v | grep job` 这个命令有点问题,因为缺少了要搜索的模式或关键字。正常情况下,`grep` 命令需要一个模式参数,用于匹配要搜索的内容。
如果您想要搜索包含 "job" 关键字的进程,可以使用类似以下的命令:
```
ps aux | grep job
```
这将列出所有包含 "job" 关键字的进程。其中,`ps aux` 用于显示所有正在运行的进程,然后通过管道 `|` 将结果传递给 `grep job` 进行过滤。
如果您希望排除包含 "job" 关键字的进程,可以使用 `-v` 参数来反转匹配:
```
ps aux | grep -v job
```
这将列出不包含 "job" 关键字的进程。
请确保在使用 `grep` 命令时提供正确的模式或关键字,并根据需要进行适当的修改。
ps aux|grep -v grep|grep opentest
ps aux|grep -v grep|grep opentest 是一个常用命令行指令,用于查找正在运行的进程中包含关键字 "opentest" 的进程。具体解释如下:
- ps:用于显示当前系统中的进程状态。
- aux:选项用于显示所有用户的所有进程。
- grep -v grep:用于过滤掉包含关键字 "grep" 的行,避免将 grep 进程本身也显示出来。
- grep opentest:用于过滤出包含关键字 "opentest" 的行,即查找包含 "opentest" 的进程。
综上所述,ps aux|grep -v grep|grep opentest 的作用是查找正在运行的进程中包含关键字 "opentest" 的进程。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)