<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Question about tar in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/question-about-tar/m-p/3078196#M6793</link>
    <description>If you have gnu tar you can use -C option to put the file in a different directory (you change only the root directory, the directory structure will be recreated in the new directory instead of /).&lt;BR /&gt;You can also use pax (man pax) which is a very powerfull archive reader (read tar and cpio archives).&lt;BR /&gt;I hope that's help,&lt;BR /&gt;Virgil</description>
    <pubDate>Mon, 29 Sep 2003 05:55:12 GMT</pubDate>
    <dc:creator>Virgil Chereches_2</dc:creator>
    <dc:date>2003-09-29T05:55:12Z</dc:date>
    <item>
      <title>Question about tar</title>
      <link>https://community.hpe.com/t5/operating-system-linux/question-about-tar/m-p/3078192#M6789</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;IÂ´m doing a tar of the full system:&lt;BR /&gt;&lt;BR /&gt;tar cvf /dev/st0 /&lt;BR /&gt;&lt;BR /&gt;When I want to restore a single file in a directory different of the original, i.e:&lt;BR /&gt;&lt;BR /&gt;cd /tmp&lt;BR /&gt;tar xvf /dev/st0 home/user1/myfile.txt&lt;BR /&gt;&lt;BR /&gt;I have the file with the full path : /tmp/home/user1/myfile.txt&lt;BR /&gt;&lt;BR /&gt;How can I restore the file directly in /tmp?&lt;BR /&gt;&lt;BR /&gt;Th</description>
      <pubDate>Thu, 25 Sep 2003 08:39:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/question-about-tar/m-p/3078192#M6789</guid>
      <dc:creator>R.O.</dc:creator>
      <dc:date>2003-09-25T08:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: Question about tar</title>
      <link>https://community.hpe.com/t5/operating-system-linux/question-about-tar/m-p/3078193#M6790</link>
      <description>Sorry, in this case you can not do this. Because you created the tar by specifying / all files will restore under /. You can see this with tar tvf /dev/st0. To fix, change your command to create the tar so it performs tar cvf /dev/st0 ./  (make sure you do a cd / before you start), so when you extract a file it will recover relative to your pwd.</description>
      <pubDate>Thu, 25 Sep 2003 09:22:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/question-about-tar/m-p/3078193#M6790</guid>
      <dc:creator>John Waller</dc:creator>
      <dc:date>2003-09-25T09:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Question about tar</title>
      <link>https://community.hpe.com/t5/operating-system-linux/question-about-tar/m-p/3078194#M6791</link>
      <description>I afraid you can't do this&lt;BR /&gt;&lt;BR /&gt;Vitaly</description>
      <pubDate>Thu, 25 Sep 2003 09:23:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/question-about-tar/m-p/3078194#M6791</guid>
      <dc:creator>Vitaly Karasik_1</dc:creator>
      <dc:date>2003-09-25T09:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: Question about tar</title>
      <link>https://community.hpe.com/t5/operating-system-linux/question-about-tar/m-p/3078195#M6792</link>
      <description>That's very odd.&lt;BR /&gt; &lt;BR /&gt;Most versions of GNU's tar automatically strip the leading /, realising that it's a bad idea, and requires the '-P' switch (--absolute-paths) in order to forcibly save it.&lt;BR /&gt; &lt;BR /&gt;Care to tell us what version of tar you are using ? (tar --version)&lt;BR /&gt; &lt;BR /&gt;In any case, the quick solutions are these:&lt;BR /&gt; &lt;BR /&gt;- use a chroot environment to restore it.&lt;BR /&gt;- change the backup routine to 'cd /;tar cvf /dev/st0 .' instead.&lt;BR /&gt; &lt;BR /&gt;Hope this helps.</description>
      <pubDate>Thu, 25 Sep 2003 19:37:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/question-about-tar/m-p/3078195#M6792</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2003-09-25T19:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: Question about tar</title>
      <link>https://community.hpe.com/t5/operating-system-linux/question-about-tar/m-p/3078196#M6793</link>
      <description>If you have gnu tar you can use -C option to put the file in a different directory (you change only the root directory, the directory structure will be recreated in the new directory instead of /).&lt;BR /&gt;You can also use pax (man pax) which is a very powerfull archive reader (read tar and cpio archives).&lt;BR /&gt;I hope that's help,&lt;BR /&gt;Virgil</description>
      <pubDate>Mon, 29 Sep 2003 05:55:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/question-about-tar/m-p/3078196#M6793</guid>
      <dc:creator>Virgil Chereches_2</dc:creator>
      <dc:date>2003-09-29T05:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: Question about tar</title>
      <link>https://community.hpe.com/t5/operating-system-linux/question-about-tar/m-p/3078197#M6794</link>
      <description>Sorry for the last post.&lt;BR /&gt;I didn't get very well the question.&lt;BR /&gt;Use option "-s" at pax! It would do the trick.&lt;BR /&gt;Virgil.</description>
      <pubDate>Mon, 29 Sep 2003 05:57:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/question-about-tar/m-p/3078197#M6794</guid>
      <dc:creator>Virgil Chereches_2</dc:creator>
      <dc:date>2003-09-29T05:57:44Z</dc:date>
    </item>
  </channel>
</rss>

