【发布时间】:2017-05-05 17:14:05
【问题描述】:
我正在尝试使用 Centos 7 获取 httpd 服务的状态。 我想知道我是否只能打印 Active 的值,在这个例子中是非活动的(死)
这是我正在使用的命令:
[root@localhost ~]# service httpd status | grep Active
这是该命令的结果。
Redirecting to /bin/systemctl status httpd.service
Active: inactive (dead)
这是我想要的输出:inactive (dead)。
【问题讨论】:
标签: linux shell command centos7