title: Hadoop HDFS Command - Rename a directory
body: <p>What is the best possible way to rename a directory in HDFS?</p>
  
  <p>For example, there are 2 folders A and B, each with more than 10000 files.</p>
  
  <p>I want to rename B to A and A to X.</p>
  
  <p>Is this possible with the mv command? In which case, what happens behind the scene (just a rename or the copy and remove)?</p>