# # nohup
APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

2003/12/04 nohup

I've removed advertising from most of this site and will eventually clean up the few pages where it remains.

While not terribly expensive to maintain, this does cost me something. If I don't get enough donations to cover that expense, I will be shutting the site down in early 2020.

If you found something useful today, please consider a small donation.



Some material is very old and may be incorrect today

© December 2003 Tony Lawrence

Run a command that won't be killed when you log out.

When you log out or are otherwise disconnected, a hangup signal is sent to all your processes. Using nohup causes those signals to be ignored:


nohup myscript > myscript.out 2>&1 &
 

If you just do:


nohup myscript &
 

any output from "myscript" will be sent to "nohup.out" which will be created or appended to.

Make sure "myscript" doesn't read from standard input; that won't work without redirection:

nohup myscript < answers &                           
 

Note that you need "&" to put the command in background; nohup doesn't do that for you.


If you found something useful today, please consider a small donation.



Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

->
-> nohup


Inexpensive and informative Apple related e-books:

Take Control of Apple Mail, Third Edition

Take Control of Pages

Take Control of iCloud, Fifth Edition

Take Control of iCloud

El Capitan: A Take Control Crash Course





More Articles by © Tony Lawrence





Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us


Printer Friendly Version





Thunder is good, thunder is impressive; but it is lightning that does the work. (Mark Twain)




Linux posts

Troubleshooting posts


This post tagged:

Scripting

Shell

UnixWords



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode