title: How can I redirect nohup output to a specified file?
body: <p>Everything I have tried from other examples I have found on SO don't seem to work. I am trying to run my application using nohup but append the output of the application to a file.</p>
  
  <p>I have tried some of the following. None of which seem to work.</p>
  
  <pre><code>nohup dotnet application.dll &amp;&gt; out.log &amp;
  nohup dotnet application.dll &gt; out.log 2&gt;&amp;1 &amp;
  nohup dotnet application.dll &gt; /opt/out.log &amp;
  </code></pre>
  
  <p>I always receive something like</p>
  
  <pre><code>-bash: out.log: Permission denied
  </code></pre>
  
  <p>I have tried running the application using sudo but it still doesn't seem to work.</p>
  
  <hr>
  
  <pre><code>nohup dotnet application.dll &amp;
  </code></pre>
  
  <p>Works fine, but it directs the output to some other directory like <code>/home/ubuntu/nohup.out</code></p>
  
  <p>What am I doing wrong?</p>