[problem]
Sometimes you want to list all processes that have been initiated by cron.
[/problem]
[solution]
To do this you first need to know the Process ID (PID) of the cron process, then to list all children of that process.
Luckily Solaris has ptree and pgrep, so it is simple.
[/solution]
[example]
ptree `pgrep cron`
Looks like Linux also has pgrep and pstree:
pstree -p `pgrep cron`
[/example]
[reference]
[tags]Process commands, Unix Coding School[/tags]
[/reference]
If you have found my website useful, please consider buying me a coffee below 😉