Quote:
Originally Posted by
Kamesh G
Also the preferrable mode is to run it as "nohup ./script.sh &" . Can you help me how to log all the outputs from the script ????
The real question is not where the output goes (when you start a process with
nohup per default its output goes to
./nohup.out) but where the input is supposed to come from.
When you start a process on the commandline this commandline is displayed in a terminal. Per default input comes from this terminal (the keyboard) and output goes to this terminal (the screen). Starting a process with
nohup cuts this connection to a terminal - actually this is the whole point of
nohup: allowing a process to continue even if its terminal is closed ("hangs up").
Bottom line: if you want to start the process with
nohup you need something which replaces the terminal as a source of input. That can be some file, a named pipe or whatever - but something has to be there and you need to use redirection to make the process use this instead of waiting indefinitely.
I hope this helps.
bakunin