title: Is rename() atomic?
body: <p>I am not being able to check this via experiments and could not gather it from the man pages as well. </p>
  
  <p>Say I have two processes, one moving(rename) file1 from directory1 to directory2. Say the other process running concurrently copies the contents of directory1 and directory2 to another location. Is it possible that the copy happens in such a way that both directory1 and directory2 will show file1 - i.e directory1 is copied before the move and directory2 after the move by the first process.</p>
  
  <p>Basically is rename() is an atomic system call?</p>
  
  <p>Thanks</p>