Walking a process tree
16:34 06 Mar 2011

I have the following scenario.

The user would type the PID of a process, and the script should show the process and it's subprocesses, sub-subprocesses (and so on) of PID, and it should list it in a tree format.

I tried using pstree PID and ps faux PID, but it doesn't work. It seems like it doesn't take PID of processes as arguments.

Any ideas please?

linux shell unix pstree