<p>I am getting Error: unknown shorthand flag: 'R' in -R error when I run the line below. I'm aware of the root cause. It is -R. How can I run this command without issue?</p>
<pre><code>kubectl -n $NAMESPACE -c vault cp -R /source /destination
</code></pre>
<p>P.S.: withour -R, I can run the command, but I want to copy the directories. Any help would be appreciated it. Thanks</p>

cosmos-1905-14
<p>As Barmar said, this option doesn't exist on <code>kubectl cp</code> If you want to copy a directory into the container use the command below:</p>
<pre><code>kubectl cp /home/local-dir &lt;pod-name&gt;:/tmp/container-dir
</code></pre>
<p>To copy the directory to a specific container into the pod use:</p>
<pre><code>kubectl cp /home/local-dir &lt;pod-name&gt;:/tmp/container-dir -c container-name
</code></pre>
