favorite commands — nohup

Steven Black
Oracle Cloud Hub
Published in
1 min readJul 3, 2018

Published by Steven Black July 3rd, 2018

bash ❤’s you

nohup allows me to run jobs on my servers and have them keep running even when I log off.

I’ll give you a few examples, but that’s no substitute for the docs! https://www.freebsd.org/cgi/man.cgi?nohup or just run man nohup

# for example, run my script.py even if I lose connectionnohup script.py
# but let's say I want to have my terminal back after running itnohup script.py &
# but my favorite is getting all the output and getting the pid!nohup script.py > script.out 2>&1 echo $! > script.pid

Originally published at blog.sblack.rocks on July 3, 2018.

--

--

Steven Black
Oracle Cloud Hub

Ramblings of Enthusiasm. I’m a Solution Engineer @Oracle, on twitter @Genseb7. Here are my views (not those of my employer)