The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
nohup.out ramky79 AIX 5 10-23-2007 03:28 AM
nohup - help! bluemoon1 UNIX for Dummies Questions & Answers 9 10-11-2007 08:49 PM
Help on nohup bobbyjohnz UNIX for Advanced & Expert Users 3 10-18-2006 08:56 AM
nohup ( no log message) mike1022 Shell Programming and Scripting 1 09-16-2006 05:55 PM
nohup usage.. charan81 UNIX for Dummies Questions & Answers 2 05-21-2006 11:41 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 07-21-2006
Registered User
 

Join Date: Jul 2006
Posts: 18
Nohup

Hi,

Using nohup it sends output automatically to $HOME/nohup.out - how do I direct this output to another named file instead, so I can run several scripts in the background at once, directing their outputs into individual log files?

Cheers
Reply With Quote
Forum Sponsor
  #2  
Old 07-21-2006
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,326
Check if the user running the nohup command has permissions to write in the pwd.
Quote:
If nohup.out is not writable in the current directory, out-put is redirected to $HOME/nohup.out.
By default, the file will be created in the current directory.
Reply With Quote
  #3  
Old 07-21-2006
Registered User
 

Join Date: Jul 2006
Posts: 18
Sorry... I'm wanting to state a named file to direct it to, so I can run several at once. I don't mind if they end up in $HOME, I just need to change nohup.out to be something I choose, so I can run several at once and then it won't end up all garbled in together.

Ta
Reply With Quote
  #4  
Old 07-21-2006
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,326
I checked the man page of nohup. Here's what it says:
HTML Code:
nohup.out
           the output file of the  nohup  execution  if  standard
           output  is  a terminal and if the current directory is
           writable.

$HOME/nohup.out
           the output file of the  nohup  execution  if  standard
           output  is  a terminal and if the current directory is
           not writable.
This means that to not have the nohup.out file, you have to redirect the stdout to some file.
Try running the nohup command as:
Code:
# nohup command > /path/to/nohup_logfile 2>&1 &
This will create the nohup log in the mentioned logfile.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 10:49 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0