1751707 Members
5154 Online
108781 Solutions
New Discussion юеВ

Re: nohup command

 
gany59
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
g3jza
Esteemed Contributor

Re: nohup command

Hi,

#man nohup

it is used to redirect standard output/error to a file.
sangilak
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
Michal Kapalka (mikap)
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
Dennis Handly
Acclaimed Contributor

Re: nohup command

What problem are you trying to solve? Typically if it is SIGHUP/hangups, then nohup is the solution.
Wilfred Chau_1
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.
gany59
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!
g3jza
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
gany59
Regular Advisor

Re: nohup command

ok g3jza,

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

Re: nohup command

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