您可以使用 UID或名称,如您所见man pgrep
:
-u euid,...
Only match processes whose effective user ID is listed. Either the
numerical or symbolical value may be used.
-U uid,...
Only match processes whose real user ID is listed. Either the
numerical or symbolical value may be used.
Run Code Online (Sandbox Code Playgroud)
如果您也不知道,只需使用命令替换:
pgrep -u "$(whoami)"
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
6489 次 |
最近记录: |