title: mv 'x' and 'y' are the same file
body: <p>I'm trying to write a shell script that moves files from one destination to another and afterwards deletes the files that are older than 7 days.</p>
  
  <p>However, I keep getting this same error: </p>
  
  <pre><code>mv: ‘x’ and ‘y’ are the same file
  </code></pre>
  
  <p>This is my command:</p>
  
  <pre><code>find /opt/files/ -type f -name '*.csv' -mtime +1 -exec mv {} /opt/files/oldCSVFiles/ \;
  find /opt/files/oldCSVFiles/ -type f -name '*.csv' -mtime +7 -exec rm {} \;
  </code></pre>
  
  <p>Thanks in advance!</p>