开发者

Avoid related processes in process listing

开发者 https://www.devze.com 2023-03-17 07:09 出处:网络
How can I generate a process listing, that does not include the current process, its shell and any related processes in the process group, and the SSHD process generated to handle the session?

How can I generate a process listing, that does not include the current process, its shell and any related processes in the process group, and the SSHD process generated to handle the session?

Does ps(1) actually have an option that does this?

Is there some predicate I can 开发者_运维知识库apply to each process to filter it out of any listing I generate?


Combining the answer referenced below with the -N (--deselect) option for ps might get you there:

  • How do I find the top-level parent PID of a given process using bash?
0

精彩评论

暂无评论...
验证码 换一张
取 消