DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Controlling processes

Keeping a process running after you log off

It is sometimes useful to let one or more of your processes continue after you log out. In the Bourne and Korn shells, you can use the nohup(C) (no hangup) command to do this. (nohup is unnecessary in the C shell; background jobs started by csh continue even after the parent shell terminates.)

The format of nohup is as follows:

nohup command

Executed in the background using the ampersand, such a process will continue executing for its normal term, and will not be aborted by finishing the session.

For example:

   $ nohup find / -name chapter6.txt -print > files_found &
The find process runs in the background and does not stop when you log off. The output is directed to a file called files_found. If redirection is not specified, output from the program is saved in a file called nohup.out in the current working directory, or in $HOME/nohup.out if the current directory is unwritable.

Next topic: Using signals under the UNIX system
Previous topic: Moving foreground jobs to the background

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003