Running a task in the background while exiting the console
Sometimes you may have to run a script in the background but may want to exit the console before it finishes. If you quit the console, your task also quits as it is a child process. The best way to solve this issue is to use the nohup command. Given below is the syntax to do so:
# nohup <command> &
Here is an example:
# nohup ping www.yahoo.com &
[1] 5556
# nohup: appending output to `nohup.out’ You can exit the console now, and later log in and open the nohup.out file to see the output of the command.