Avoid related processes in process listing
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?
精彩评论