Re: Why is a nohup.out file created for this command?



On 2008-05-20, Wolfgang Meister <wmeister@xxxxxxxxxxx> wrote:


When I perform the following command:

nohup sh -c "echo `date` >>logfile.txt && ls -l >>logfile.txt && echo `date` >>logfile.txt" &

or - alternatively - without the trainling "&":

nohup sh -c "echo `date` >>logfile.txt && ls -l >>logfile.txt && echo `date` >>logfile.txt" &

I always got a response:

nohup: appending output to `nohup.out'

file nohup.out is created but always empty. logfile.txt is filled as intended.

How can I suppress the nohup.out message and the nohup.out file creation?

Wolfgang

The nohup command sees the arguments 'sh' '-c' and a long quoted string.
To suppress nohup.out, you need to redirect nohup's output.
.



Relevant Pages