title: What happens when mv command for rename is interrupted
body: <p>I like to use <code>mv</code> command to rename a file within the same filesystem but what happens when the process gets interrupted? Example:</p>
  
  <pre><code>mv file1.txt file2.txt
  </code></pre>
  
  <p>Both file1.txt and file2.txt will be on the same directory. AFAIK file1.txt gets renamed as file2.txt and file2.txt's memory range blocks gets marked as free. So when it gets interrupted, will there be both files named file2.txt? But linux/unix won't allow that right?</p>