| You are here: SillyDog701 > UNIX Guide >SillyDog701 > UNIX Guide > (index) |
To run a process in the background as a job and carry on working add an & (ampersand) at the end of the command line. For example:
find /usr/man -name *.1 -print > sect1 & [1] 2548
The shell forks a child process to run the command and displays the job number ([n]) and the PID (Process IDentifier) number. The shell prompt returns and you can enter further commands.
Redirect the standard output for a command that is being run in the background to a file. This prevents the output from the command appearing on your screen and interrupting your current work.
If the command is likely to produce error messages you will need to redirect standard error. Otherwise all error messages are sent to your screen.
Do not run an interactive command that requires you to type something at the terminal as a background job. If you do the job will stop and wait for user input. You will then have to kill its process.
UNIX Guide home |
search |
index
| Page URL: http://sillydog.org/unix/ [SillyDog701] [Netscape] [MozInfo701] [MacCentre701] [UNIX Guide] [AntTunes701][Forums] [Search] [Change Log] [Feedback] [About Us] [Sitemap] This UNIX Guide maintained by SillyDog701, portion of this Guide is based on UNIXhelp. UNIXhelp is copyright University of Edinburgh. This page was last modified on 14 March, 2006 |
support MozInfo701 and SillyDog701 |