linux - Ubuntu: service --status-all 不能与 |更多或 | grep git

标签 linux ubuntu service grep

<分区>

Ubuntu: service --status-all 不能与 |更多| grep git

我看到一长串正在运行的服务,但我无法按页面查看或过滤它。以上附加项不影响输出。

最佳答案

似乎 service --status-all 使用了 stderrstdoutgrepmore 不影响 stderr。我们需要使用重定向。

service --status-all 2>&1 | grep git
service --status-all 2>&1 | more

关于linux - Ubuntu: service --status-all 不能与 |更多或 | grep git,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17690434/

相关文章:

ubuntu - Tomcat6 无法启动 Linux Mint virtualbox guest

c - 关于覆盖 linux 内核宏的一件有趣的事情

linux - CUDA C 项目中的编译错误(nvcc 编译器)

ubuntu - 如何在ubuntu中调用play-framework脚本?

c++ - 如何在 Linux (Ubuntu) 上获取 C/C++ 文档的完整路径

Android:在图书馆项目中使用服务

design-patterns - 服务和 DAO 与 MVC

deployment - Robocopy 将文件复制到远程机器

linux - 在 linux mint 16 上为 python3 构建 protobuf

python - 将变量从 python 脚本传递到 bash 脚本