Avinash
Avinash

Reputation: 1

In bash how to print all sibling processes of current process

I know the pid of my current process... I am trying to figure out the processes who have same ppid as the pid of current process

Upvotes: 0

Views: 216

Answers (1)

dash-o
dash-o

Reputation: 14424

You can use ps --ppid to select by parent PID, Using bash builtin variable PPID.

ps --ppid "$PPID"

Upvotes: 1

Related Questions