Run Unix Process in Background
Sometimes during running jobs or commands which needs long time and you will want to run the command and "exit" from the terminal. When the shell exits though, it sends its children a SIGHUP signal, which by default causes them to be killed. All stopped, running and background jobs will ignore SIGHUP and continue running if their invocation is preceded by the nohup or if the process programmatically has chosen to ignore SIGHUP.
The nohup utility invokes the named command with the arguments supplied. When the command is invoked, nohup arranges for the SIGHUP signal to be ignored by the process.
Syntax
/usr/bin/nohup command [ argument ...]
Processes run by /usr/bin/nohup are immune to SIGHUP (hangup) and SIGQUIT (quit) signals.
Examples:
To run a command in the background after you log off, enter:
$ nohup find / -print &
To run a command in the background and redirect the standard output to a different file, enter:
$ nohup find / -print > filenames &
This example runs the find / -print command and stores its output in a file named filenames. Now only the process ID and prompt are displayed:
677
Wait before logging off because the nohup command takes a moment to start the command specified by the command parameter. If you log off too quickly, the command specified by the command parameter may not run at all. Once the command specified by the command parameter starts, logging off does not affect it.