← 返回命令列表

Linux command

psgrep 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Search processes by name

psgrep [pattern]

Case insensitive search

psgrep -i [pattern]

Show full command line

psgrep -f [pattern]

说明

psgrep is a convenience wrapper that combines ps and grep to search for running processes by name or pattern. It filters the process list and displays matching entries, automatically excluding the grep process itself from the results to avoid false matches. The tool provides a simpler alternative to the `ps aux | grep pattern` idiom. On many systems, the built-in pgrep command offers similar functionality with more options.

参数

-i
Case insensitive.
-f
Full command line.
-v
Invert match.

FAQ

What is the psgrep command used for?

psgrep is a convenience wrapper that combines ps and grep to search for running processes by name or pattern. It filters the process list and displays matching entries, automatically excluding the grep process itself from the results to avoid false matches. The tool provides a simpler alternative to the `ps aux | grep pattern` idiom. On many systems, the built-in pgrep command offers similar functionality with more options.

How do I run a basic psgrep example?

Run `psgrep [pattern]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -i do in psgrep?

Case insensitive.