pgrep为一命令行工具,本为Solaris 7而编写,后又衍出Linux与BSD系操作系统的对应实现。这一命令可搜索出所有名字与所给正则表达式相匹配的进程,而后在默认情况下返回相应进程标识符;若带上-2为参数,则一并返回进程名。除此之外,还可指定搜索的进程组范围(-g)、进程所属用户(-u)、是否最近启动进程(-n)与反转搜索(-v)。
This article uses material from the Wikipedia 中文 article Pgrep, which is released under the Creative Commons Attribution-ShareAlike 3.0 license ("CC BY-SA 3.0"); additional terms may apply (view authors). 除非另有声明,本网站内容采用CC BY-SA 4.0授权。 Images, videos and audio are available under their respective licenses.
®Wikipedia is a registered trademark of the Wiki Foundation, Inc. Wiki 中文 (DUHOCTRUNGQUOC.VN) is an independent company and has no affiliation with Wiki Foundation.