title: IO Redirection in Linux Bash shell scripts not recreating moved/deleted file?
body: <p>I am quite new to shell programming on Linux and in my Linux instance, I am redirecting the stdout and stderr of a program to two files in following manner and run it in background</p>
  
  <pre><code>myprog &gt; run.log 2&gt;&gt; err.log &amp;
  </code></pre>
  
  <p>This works fine, and I get my desired behavior</p>
  
  <p>Now there is a another background process that monitors the run.log and err.log, and moves them to other file names, if the log files grow beyond a certain threshold.</p>
  
  <p>e.g. <code>mv err.log err[date-time].log</code></p>
  
  <p>my expectation is that after this file move happens, err.log will be created again by the myprog output redirection and new output will be written to that new file. However, after my log file monitoring process moves the file, err.log or run.log never get created again although myprog continues to run without any issues.</p>
  
  <p>Is this the normal behavior in Linux? If it is, what should I do to get my expected behavior working?</p>