pgrep命令
来源:原创 更新时间:2018-09-04 19:54:55 作者:管理员 浏览:2708
- 命令描述
- 命令语法
- 命令选项
-n:仅显示找到的最大(结束)进程号;
-l:显示进程名称;
-P:指定父进程号;
-g:指定进程组;
-t:指定开启进程的终端;
-u:指定进程的有效用户ID。
- 命令参数
- 命令实例
实例1:
pgrep -lo httpd 4557 httpd [root@localhost ~]# pgrep -ln httpd 4566 httpd [root@localhost ~]# pgrep -l httpd 4557 httpd 4560 httpd 4561 httpd 4562 httpd 4563 httpd 4564 httpd 4565 httpd 4566 httpd [root@localhost ~]# pgrep httpd 4557 4560 4561 4562 4563 4564 4565 4566