Specify where nohup outputs to?
Hi hi,
I have a problem with nohup that has really given me a headache. If you guys can help me with this, it'd really make my life a whole lot easier.
I assume you are familiar with nohup if you are replying to this thread. If I cd into /home/chibi and type nohup ./myfile & it will create a file called nohup.out located at /home/chibi/nohup.out and log all of myfile's output to it. This is true in a regular environment and circumstances.
Unfortunately, the environment that I am working in allows me to execute commands, but not through a terminal. Where the command is sent, has no write permissions whatsoever. So any nohup command I do just doesn't work because it wants to write nohup.out in the same directory the command was executed from. But as far as I know there isn't a directory! But again even if there is, there is no write permissions there at all.
So what I really need is, even though I am executing the command in /home/chibi/ , I need it to tell nohup to put its output file somewhere else like /pub/logs/nohup.out for instance.
Is this possible and how would I go about doing this?
Your help is greatly appreciated. I have a horrid work around for this right now, but it creates zombie processes that eventually cause services to stop working, requiring them to be restarted.
Thank you!
-Chi
Last edited by chibi; 01-30-2006 at 10:58 PM.
|