Operating System - HP-UX
1847817 Members
5298 Online
104021 Solutions
New Discussion

which did nohup.out file goes?

 
Gary Yu
Super Advisor

which did nohup.out file goes?

Hi all,

If I setup a cronjob, and inside the script started by cron, I start a background program using "nohup", where can I find the nohup.out file? it's not in the directory of the cron script, nor at the directory where the background job starts. where can I find it?

thanks,
Gary
3 REPLIES 3
James Specht
Trusted Contributor

Re: which did nohup.out file goes?

Cron jobs start out in the home directory of the user the cron job belongs to. So if it ran as joe_user you should find the file in ~joe_user.

--Jim
"Everyone can be taught to sculpt: Michelangelo would have had to be taught how not to. So it is with the great programmers."
Gary Yu
Super Advisor

Re: which did nohup.out file goes?

Hi James, that's what I initailly thought, but I didn't find it at user's home directory...

thanks,
Gary
Umapathy S
Honored Contributor

Re: which did nohup.out file goes?

Gary,
nohup.out will be written in the current dir. If not writable then to $HOME. As both of these are not defined in a cron env, it is better to put the whole path for the nohup output file.
So manually redirect it to a file with a full path.

HTH,
Umapathy
Arise Awake and Stop NOT till the goal is Reached!