title: Linux cp command to copy a folder to current directory
body: <p>I am wondering if there is an identical command for copying a folder to current directory like it did using the old MS-DOS. Let's say my current directory location is:</p>
  
  <pre><code>/var/www/
  </code></pre>
  
  <p>I have folders and files at:</p>
  
  <pre><code>/home/hope/subfolder/docs/
  /home/hope/subfolder/images/
  /home/hope/subfolder/.config
  /home/hope/subfolder/readme.txt
  </code></pre>
  
  <p>I know that the following command:</p>
  
  <pre><code>cp -rT /home/hope/subfolder .
  </code></pre>
  
  <p>will copy all the files (even dot hidden files) and folders within the "subfolder" folder to the current directory, so the result will be:</p>
  
  <pre><code>/var/www/docs/
  /var/www/images/
  /var/www/.config
  /var/www/readme.txt
  </code></pre>
  
  <p>Looks like the command to that to copy the source folder to the current location is:</p>
  
  <pre><code>cp -rT /home/hope/subfolder ./subfolder
  </code></pre>
  
  <p>although this is fine, I find it that sometimes I will make mistakes for complicated folder names for the destination, so is there a way to use a command like:</p>
  
  <pre><code>cp -rT /home/hope/subfolder .
  </code></pre>
  
  <p>or even like this</p>
  
  <pre><code>cp -rT /home/hope/subfolder /var/www/.
  </code></pre>
  
  <p>to have the following result:</p>
  
  <pre><code>/var/www/subfolder/docs/
  /var/www/subfolder/images/
  /var/www/subfolder/.config
  /var/www/subfolder/readme.txt
  </code></pre>
  
  <p>Thank you.</p>