title: How to change replication factor while running copyFromLocal command?
body: <p>I'm <strong>not asking how to set replication factor</strong> in hadoop for a folder/file. I know following command works flawlessly for existing files &amp; folders.</p>
  
  <pre><code>hadoop fs -setrep -R -w 3 &lt;folder-path&gt;
  </code></pre>
  
  <p>I'm asking, how do I set the replication factor, other than default (which is 4 in my scenario), while copying data from local. I'm running following command,</p>
  
  <pre><code>hadoop fs -copyFromLocal &lt;src&gt; &lt;dest&gt;
  </code></pre>
  
  <p>When I run above commands, it copies the data from <code>src</code> to <code>dest</code> path with replication factor as 4. But I want to make replication factor as <code>1</code> while copying data but not after copying is complete. Bascially I want something like this,</p>
  
  <pre><code>hadoop fs -setrep -R 1 -copyFromLocal &lt;src&gt; &lt;dest&gt;
  </code></pre>
  
  <p>I tried it, but it didn't work. So, can it be done? or I've first copy data with replication factor 4 and then run <code>setrep</code> command?</p>