title: How do I use cp -r to overwrite existing files on Windows Subsystem for Linux (Ubuntu)
body: <p>Running the following commands in Ubuntu WSL leads to strange behavior - the file <code>text.txt</code> within the <code>dst</code> folder is not overwritten even though it should be.</p>
  
  <pre class="lang-sh prettyprint-override"><code>mkdir temp
  mkdir temp/src
  mkdir temp/dst
  echo "src" &gt; ./temp/src/text.txt
  echo "dst" &gt; ./temp/dst/text.txt
  cp -r ./temp/src/ ./temp/dst/
  cat ./temp/dst/text.txt
  </code></pre>
  
  <p>Output</p>
  
  <pre><code>dst
  </code></pre>
  
  <p>The output SHOULD be <code>src</code>.</p>
  
  <p>I've also tried the below:</p>
  
  <pre class="lang-sh prettyprint-override"><code>sudo cp -Rfv ./temp/src/ ./temp/dst/
  cat ./temp/dst/text.txt
  </code></pre>
  
  <p>Output</p>
  
  <pre><code>'./temp/src/text.txt' -&gt; './temp/dst/src/text.txt'
  dst
  </code></pre>