title: Find and rename a directory
body: <p>I am trying to find and rename a directory on a linux system.</p>
  
  <p>the folder name is something like : <code>thefoldername-23423-431321</code></p>
  
  <p><code>thefoldername</code> is consistent but the numbers change every time.</p>
  
  <p>I tried this:</p>
  
  <pre><code>find . -type d -name 'thefoldername*' -exec mv {} newfoldername \;
  </code></pre>
  
  <p>The command actually works and rename that directory. But I got an error on terminal saying that there is no such file or directory.</p>
  
  <p>How can I fix it?</p>