title: Copy and move's command effect on inode
body: <p>I interpret inode as a pointer to the actual place where the file is stored.</p>
  
  <p>But I have problem understanding:</p>
  
  <ol>
  <li><p>If I use <code>cp file1 file2</code> in a place where <code>file2</code> <strong>already exists</strong>, the inode doesn't change. And If there is originally a hard-link to file2, they now both point to the new file just copied here.</p>
  
  <ul>
  <li>The only reason I can think of is that Linux interprets this as <strong>modifying</strong>
  the file instead of deleting and creating a new file. I don't understand why it's designed this way?</li>
  </ul></li>
  <li><p>But when I use <code>mv file1 file2</code>, the inode changes to the inode of <code>file1</code>.</p></li>
  </ol>