[Ilugc] One Day One Command (NOHUP)

  • From: sbharathi@xxxxxxxxxxxxx (Bharathi Subramanian)
  • Date: Wed Aug 24 19:42:21 2005

Since 1997, LinuxFocus.Org is a free international magazine for Linux.  
It's a non profit organization & the magazine is managed by volunteers
from all over the world. URL: http://linuxfocus.org/

One Day One Command 
===================

nohup -- Run a command even after HangUP(logout).

Summary:

`nohup' runs the given COMMAND with hangup signals ignored, so  that
the command can continue running in the background after you log out.
`nohup' does not run the command in the background. We have do it by
ending command line with an `&'.

Examples:

Create a test script :

$ cat > myscript
  sleep 60
  echo Bharathi
  date

Press Ctrl+D to save and exit.

$ chmod 555 myscript -- Add execute permission.

$ nohup myscript & -- Run the script in background.

$ logout -- Logout the session.

Again login after 2 mins.

$ cat nohup.out -- All output of the program will redirected to 
                   this file.

Read: man nohup

HTH :)
--
Bharathi S
ODOC LJ -- http://www.livejournal.com/community/ilugc/

Other related posts:

  • » [Ilugc] One Day One Command (NOHUP) - Bharathi Subramanian