Clarification regarding nohup.out


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Clarification regarding nohup.out
# 1  
Old 07-09-2009
Clarification regarding nohup.out

Hi,

I am creating two shell scripts for Database backup and the output has to be routed to nohup.out file.

We will also be running the scripts in the background as
nohup.out <script_name> &

Do I manually need to create a nohup.out file in the directory from where the scripts are going to be executed?

Regards,
Narayan
# 2  
Old 07-09-2009
Did you already read the manpage for nohup?

Here's the link to Solaris 10 manpage for nohup:http://docs.sun.com/app/docs/doc/816...nohup-1?a=view

You may want to re-read this:
Quote:
If nohup.out is not writable in the current directory, output is redirected to $HOME/nohup.out. If a file is created, the file has read and write permission (600. See chmod(1). If the standard error is a terminal, it is redirected to the standard output, otherwise it is not redirected. The priority of the process run by nohup is not altered.
Also, from the same man page:
Quote:
The C-shell (csh(1)) has a built-in command nohup that provides immunity from SIGHUP, but does not redirect output to nohup.out. Commands executed with `&' are automatically immune to HUP signals while in the background

Last edited by frozentin; 07-09-2009 at 04:19 PM.. Reason: added link + info about csh nohup
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Variable clarification

what is the significance of %%.ksh in processname and %.ksh in processname_1 variable? Why is it returning same value?How is it working? processname=Testabc export processname=${processname%%.ksh} echo $processname #It is returning Testabc export processname_1=${processname%.ksh} echo... (2 Replies)
Discussion started by: vamsi.valiveti
2 Replies

2. Shell Programming and Scripting

Nohup clarification

I have Main.sh script which will call 3 scripts as shown below. nohup script1.sh & nohup script2.sh & nohup script3.sh & Clarifification: Is all 3 scripts will be triggered at a time or it will trigger one by one(script1.sh---->script2.sh--->script3.sh)? (1 Reply)
Discussion started by: vamsi.valiveti
1 Replies

3. Shell Programming and Scripting

Saving nohup output to a file other than nohup.out

Shell : bash OS : Oracle Linux 6.4 I want to save the ouput of a nohup command to file other than nohup.out . Below are my 3 attempts. For both Attempt1 and Attempt2 , the redirection logs the output correctly to the output file. But I get the error "ignoring input and redirecting stderr to... (7 Replies)
Discussion started by: kraljic
7 Replies

4. UNIX for Advanced & Expert Users

Clarification about redirecting

Hi AM Using Unix Aix Used ${CMD} 2> ${ERR} Dont get what above statement works . SCRIPT=`basename $0` ERR=$PWD/$SCRIPT.err DATE=`date +"%d/%m/%Y"` CMD=2 ${CMD} 2> ${ERR} if then echo "SUCCESS" else echo "FAILURE" fi (1 Reply)
Discussion started by: Venkatesh1
1 Replies

5. HP-UX

su command clarification

Hi, I want to use the "SU" command in script it is asking me to enter the password manually. pleas the say the syntax of su command in single line that includes username/password. :) (3 Replies)
Discussion started by: vigneshwaran007
3 Replies

6. UNIX for Advanced & Expert Users

Need Clarification

Hi All, I have a file cleanlogs_imgp01_files which has the contents as follows, cold_log|/opt/elf/cold_spool get_orion_log|/opt/elf/logs get_coldFiles_log|/opt/elf/logs get_coldFiles_TuesToSat_log|/opt/elf/logs get_coldFiles_MonToSat_log|/opt/elf/logs And when i execute this, I get the... (1 Reply)
Discussion started by: DevM
1 Replies

7. UNIX for Advanced & Expert Users

Need clarification

We are facing problem while executin below script, cat $PIPE_FILE | imscp - "${LRX_FILE_LOC}" 2>&1 | tee "${LIST_DIR}/${IMSCP_OUT_FILE}" & sqlplus -s ${REPORTING_CONNECT} <<EOF whenever sqlerror exit 1 rollback spool ${PIPE_FILE} start ${LRX_EXEC_SQL} ${LRX_MDL_RUN_DATE} spool off exit... (4 Replies)
Discussion started by: samiks14
4 Replies

8. Shell Programming and Scripting

Need clarification on option in if

Hi, I am analisying an existing script. what the below code will do? if can some onle tell me what -a will do here. Upto my knowledge it can be used as and. In this case they gave a comment like-- it will check for the existance of the ref file. I feel -f need to be used to check the existence.... (2 Replies)
Discussion started by: kponsms
2 Replies

9. Web Development

Clarification

:confused: Hi All, i am new to unix....so i am not sure whether i am asking the related question with our forum.. My question .....Can anyone explain me about the CGI script is it something related to Unix or Linux or some other language. Thanks in advance Sha (1 Reply)
Discussion started by: Shahul
1 Replies

10. Shell Programming and Scripting

Need clarification

Hi All, I am using Korn Shell HP UNIX and i am writing my scripts with filename extension as ksh or sh .. I want to know what is the difference if i am giving ksh and sh Other thing when we execute the shell script either we make it as executable and run directly else we give '.' or 'sh'... (2 Replies)
Discussion started by: ravi.sadani19
2 Replies
Login or Register to Ask a Question