Linux: get pid of process who launch another process

PHOTO EMBED

Mon Aug 29 2022 14:20:53 GMT+0000 (Coordinated Universal Time)

Saved by @marcopinero #bash

pgrep -af <name of running process>

#who is running last created binary in /usr/bin (attack): (sudo apt-get install inotify-tools)
inotifywait -e create /usr/bin | echo $(awk '{print $3}') | xargs pgrep -af

#which process is calling this ID?
ls -l /proc/<ID>/exe
content_copyCOPY