title: How I can pack into tar-file only last directory from path?
body: <p>How I can pack into tar-file only last directory from path?
  For example, I have several paths</p>
  
  <pre><code>/usr/local/files/dir1/
  
     file1.txt
     file2.txt
     file3.txt
  
  /usr/local/files/dir2/
  
     file3.txt
     file4.txt
     file5.txt
  </code></pre>
  
  <p>if I run command:</p>
  
  <pre><code>tar czf my_arch.tar.gz -C /usr/local/files/dir1 .
  </code></pre>
  
  <p>I gain only containment of <strong>dir1</strong> catalog, without itself.</p>
  
  <p>So I have - my_arch.tar.gz/file1.txt, file2.txt, file3.txt, But I need structure like that inside my archive - </p>
  
  <pre><code>my_arch.tar.gz/dir1/file1.txt, file2.txt, file3.txt
  </code></pre>
  
  <p>How I can do this?</p>
  
  <p>Thank you.</p>