title: Output redirection with "screen" command
body: <p>Might be a simple problem, but I am running CentOS 5.4 command line remotely. I want to redirect the output of a simple Java file, lets say loop to print a hundred thousand numbers in console to a text file. The thing is, I <em>have</em> to use the 'screen' command to be able to run it in background even if I loose my session with the remote computer and this command does not write to the desired file. </p>
  
  <p>I tried the method <code>screen java MyClass &gt;&amp; log.txt</code> also <code>screen java MyClass &gt; log.txt</code> but it does not write to the file. Why is this happening and is there any solution? </p>