Документ взят из кэша поисковой машины. Адрес оригинального документа : http://comet.sai.msu.ru/UNIXhelp/shell/jobz2.html
Дата изменения: Fri Jan 17 12:43:21 1997
Дата индексирования: Mon Oct 1 22:32:13 2012
Кодировка:

Поисковые слова: universe
Running processes as background jobs

Running processes as background jobs

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.


[Home] [Search] [Index]