Linux Terminal

Hot to start and detach bash script (or command) in linux from the command line:

setsid nohup monitor.sh &

detach script/command with custom log:

setsid nohup monitor.sh &>/tmp/monitor.log &

And to check the result, use a linux command that shows the process hierarchy:

root@byrev:/usr/local/bin# ps -efj --forest

Linux command that shows the process hierarchy

Tags: , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *