cha*_*non 6 shell ps process-management
sudo ps o gpid,comm
报告类似3029 bash
但命令有参数--arbitrary -other -searchword
有没有办法显示这些参数?
您可以简单地使用with选项,而不是格式化输出ps
然后使用:grep
pgrep
-a
pgrep -a bash
Run Code Online (Sandbox Code Playgroud)
这将显示命令名称 ( bash
) 及其参数(如果有)。
来自man pgrep
:
-a, --list-full
List the full command line as well as the process ID.
Run Code Online (Sandbox Code Playgroud)