DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Programming with the SCO OpenServer system shell

Using the nohup command

All processes, except the at and batch requests, are killed when you log out. If you want a background process to continue running after you log out, you must use the nohup command to submit that background command.

To execute the nohup command, use the following format:

   nohup command &
Notice that you place the nohup command before the command you intend to run as a background process.

For example, suppose you want the grep command to search all the files in your current directory for the string word and redirect the output to a file called word.list, and you want to log out immediately afterward. Type the command line as follows:

   nohup grep word * > word.list &

You can terminate the nohup command by using the kill command. Now that you have mastered these basic shell commands and notations, use them in your shell programs! The exercises in the following section will help you practice using the shell command language. Answers to the exercises appear at the end of the section.


Next topic: Command language exercises
Previous topic: Restarting a stopped process

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005