cancel
Showing results for 
Search instead for 
Did you mean: 

nohup command

 
Highlighted
Regular Advisor

nohup command

what is the use of nohup command, and how can we use that.

Please any body let me know that. Thanks in advance!
12 REPLIES 12
Highlighted
Esteemed Contributor

Re: nohup command

Hi,

#man nohup

it is used to redirect standard output/error to a file.
Highlighted
Trusted Contributor

Re: nohup command

Hi,


From the man page:

DESCRIPTION

nohup executes command with hangups and quits ignored. If output is not redirected by the user, both standard output and standard error are sent to nohup.out. If nohup.out is not writable in the current directory, output is redirected to $HOME/nohup.out; otherwise, nohup fails. If a file is created, the file's permission bits will be set to S_IRUSR | S_IWUSR.

If output from nohup is redirected to a terminal, or is not redirected at all, the output is sent to nohup.out.

Source: http://docs.hp.com/en/B2355-90680/nohup.1.html


Hope that helps,

sangilak
Highlighted
Honored Contributor

Re: nohup command

hi,

simple explanation of nohup :

runs a command even if the session is disconnected or the user logs out.

mikap
Highlighted
Acclaimed Contributor

Re: nohup command

What problem are you trying to solve? Typically if it is SIGHUP/hangups, then nohup is the solution.
Highlighted
Respected Contributor

Re: nohup command

wiki :-)
http://en.wikipedia.org/wiki/Nohup

usually you use it with a command to run in the background, or want the command to continue to run after you exit out of the terminal from where you issue the command.
Highlighted
Regular Advisor

Re: nohup command

ok folks,

Say for an example, if i want to run the ignite backup, can i use the below format:

#nohup make_tape_recovery -A -i -x /dev/rmt/0mn

Or any other synopsis required for the nohup..

Thanks!
Highlighted
Esteemed Contributor

Re: nohup command

#nohup make_tape_recovery -A -i -x /dev/rmt/0mn &

Use the '&' if you want to run it in background
Highlighted
Regular Advisor

Re: nohup command

ok g3jza,

if u want to run the command, once i exit from my terminal also means ?
Highlighted
Esteemed Contributor

Re: nohup command

Yes, when you exit from the terminal then the command should continue executing