GNU/Linux Command – NOHUP

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 event after you logout from that session. By default, `nohup’ does not run the command in the background. We have do it by ending command line with an `&’.

Examples:
Create mytest.sh script: sleep 60 echo Bharathi date $ chmod 555 mytest.sh -- Add execute permission. $ nohup mytest.sh & -- Run the script in background. $ logout -- Logout the session. Again login after 2 mins. $ cat nohup.out -- All output of mytest.sh will be redirected   to this file.
Read: man nohup

Advertisements
Tagged with: ,
Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: