title: Find files, rename in place unix bash
body: <p>This should be relatively trivial but I have been trying for some time without much luck.
  I have a directory, with many sub-directories, each with their own structure and files.</p>
  
  <p>I am looking to find all <code>.java</code> files within any directory under the working directory, and rename them to a particular name.
  For example, I would like to name all of the java files <code>test.java</code>.</p>
  
  <p>If the directory structure is a follows:</p>
  
  <pre><code>./files/abc/src/abc.java
  ./files/eee/src/foo.java
  ./files/roo/src/jam.java
  </code></pre>
  
  <p>I want to simply rename to:</p>
  
  <pre><code>./files/abc/src/test.java
  ./files/eee/src/test.java
  ./files/roo/src/test.java
  </code></pre>
  
  <p>Part of my problem is that the paths may have spaces in them.
  I don't need to worry about renaming classes or anything inside the files, just the file names in place.</p>
  
  <p>If there is more than one <code>.java</code> file in a directory, I don't mind if it is overwritten, or a prompt is given, to choose what to do (either is OK, it is unlikely that there are more than one in each directory.</p>
  
  <p>What I have tried:</p>
  
  <p>I have looked into <code>mv</code> and <code>find</code>; but, when I pipe them together, I seem to be doing it wrong. I want to make sure to keep the files in their current location and rename, and not move.</p>