From 602e8187a41de56cd0e7aa5a8206aad35042815d Mon Sep 17 00:00:00 2001 From: zlbabe <31076777+zlbabe@users.noreply.github.com> Date: Mon, 15 Jan 2018 22:36:37 +0100 Subject: [PATCH] ps: get the parent pid --- pages/common/ps.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/ps.md b/pages/common/ps.md index f6c5e4f7c6..d912051808 100644 --- a/pages/common/ps.md +++ b/pages/common/ps.md @@ -21,3 +21,7 @@ - List all processes of the current user as a tree: `ps --user $(id -u) f` + +- Get the parent pid of a process + +`ps -o ppid= -p {{pid}}`