title: Batch rename in hadoop
body: <p>How can I rename all files in a hdfs directory to have a <code>.lzo</code> extension? <code>.lzo.index</code> files should not be renamed. </p>
  
  <p>For example, this directory listing:</p>
  
  <blockquote>
  <pre><code>file0.lzo file0.lzo.index file0.lzo_copy_1 
  </code></pre>
  </blockquote>
  
  <p>could be renamed to:</p>
  
  <blockquote>
  <pre><code>file0.lzo file0.lzo.index file0.lzo_copy_1.lzo 
  </code></pre>
  </blockquote>
  
  <p>These files are lzo compressed, and I need them to have the <code>.lzo</code> extension to be recognized by hadoop.</p>