<?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: create a tar file in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/create-a-tar-file/m-p/3626034#M104820</link>
    <description>the tar file is created and used by others.&lt;BR /&gt;&lt;BR /&gt;in case if people forget to cd to /tmp, I still want tar to handle it, that is why.&lt;BR /&gt;&lt;BR /&gt;look the only solution is&lt;BR /&gt;cp ~/tests/* /tmp/tests.&lt;BR /&gt;tar -cv test.tar /tmp/tests/*&lt;BR /&gt;&lt;BR /&gt;hmm.....&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 14 Sep 2005 12:30:16 GMT</pubDate>
    <dc:creator>Gemini_2</dc:creator>
    <dc:date>2005-09-14T12:30:16Z</dc:date>
    <item>
      <title>create a tar file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-a-tar-file/m-p/3626029#M104815</link>
      <description>Hi, my tar files are under ~/test. when I create the tar ball, I want it to prefix with /tmp. how do I do that?&lt;BR /&gt;&lt;BR /&gt;for example&lt;BR /&gt;my step now is&lt;BR /&gt;cd ~/&lt;BR /&gt;tar -cvf test.tar test/*&lt;BR /&gt;&lt;BR /&gt; tar -tvf show&lt;BR /&gt;~/test/1&lt;BR /&gt;~/test/2&lt;BR /&gt;&lt;BR /&gt;how can I change it to &lt;BR /&gt;/tmp/test/1&lt;BR /&gt;/tmp/test/2&lt;BR /&gt;&lt;BR /&gt;I know that I can move files to /tmp, and then create the patch there...but is there a better way?&lt;BR /&gt;&lt;BR /&gt;thank you&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Sep 2005 12:15:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-a-tar-file/m-p/3626029#M104815</guid>
      <dc:creator>Gemini_2</dc:creator>
      <dc:date>2005-09-14T12:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: create a tar file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-a-tar-file/m-p/3626030#M104816</link>
      <description>simply specify the output path to the tar command:&lt;BR /&gt;&lt;BR /&gt;tar -cvf /tmp/test.tar test/*&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Sep 2005 12:21:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-a-tar-file/m-p/3626030#M104816</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2005-09-14T12:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: create a tar file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-a-tar-file/m-p/3626031#M104817</link>
      <description>remove test/ from your syntax cd into that directory and do tar -cvf /yourfile.tar *.  Then cd to the restore directory say /tmp/test1 and restore there.</description>
      <pubDate>Wed, 14 Sep 2005 12:23:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-a-tar-file/m-p/3626031#M104817</guid>
      <dc:creator>generic_1</dc:creator>
      <dc:date>2005-09-14T12:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: create a tar file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-a-tar-file/m-p/3626032#M104818</link>
      <description>Usually you don't want absolute path names in a tar file.&lt;BR /&gt; &lt;BR /&gt;cd ~/&lt;BR /&gt;tar cf test.tar test/*&lt;BR /&gt; &lt;BR /&gt;is what you want to do.&lt;BR /&gt; &lt;BR /&gt;To restore to tmp, you would then&lt;BR /&gt; &lt;BR /&gt;cd /tmp&lt;BR /&gt;tar xf ~/test.tar&lt;BR /&gt; &lt;BR /&gt;gnu tar might be able to do what you want.&lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Wed, 14 Sep 2005 12:24:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-a-tar-file/m-p/3626032#M104818</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2005-09-14T12:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: create a tar file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-a-tar-file/m-p/3626033#M104819</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Generally speaking making 'tar' archives with relative paths provides the most flexability.&lt;BR /&gt;&lt;BR /&gt;That said, however, I'd look at 'pax' ('tar's cousin).  'pax' gives you the opportunity to do regular expresssion substitutions o the archive member names.&lt;BR /&gt;&lt;BR /&gt;See the man pages for 'pax' and the '-s' option therein.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 14 Sep 2005 12:28:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-a-tar-file/m-p/3626033#M104819</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-09-14T12:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: create a tar file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-a-tar-file/m-p/3626034#M104820</link>
      <description>the tar file is created and used by others.&lt;BR /&gt;&lt;BR /&gt;in case if people forget to cd to /tmp, I still want tar to handle it, that is why.&lt;BR /&gt;&lt;BR /&gt;look the only solution is&lt;BR /&gt;cp ~/tests/* /tmp/tests.&lt;BR /&gt;tar -cv test.tar /tmp/tests/*&lt;BR /&gt;&lt;BR /&gt;hmm.....&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Sep 2005 12:30:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-a-tar-file/m-p/3626034#M104820</guid>
      <dc:creator>Gemini_2</dc:creator>
      <dc:date>2005-09-14T12:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: create a tar file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-a-tar-file/m-p/3626035#M104821</link>
      <description>pax is not standard linux redhat rpm package right?</description>
      <pubDate>Wed, 14 Sep 2005 12:31:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-a-tar-file/m-p/3626035#M104821</guid>
      <dc:creator>Gemini_2</dc:creator>
      <dc:date>2005-09-14T12:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: create a tar file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-a-tar-file/m-p/3626036#M104822</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;DONT make absolute tar files, you get get in a whole heap of problems doing this...&lt;BR /&gt;&lt;BR /&gt;try&lt;BR /&gt;&lt;BR /&gt;# cd /tmp; tar xf test.tar&lt;BR /&gt;&lt;BR /&gt;Tim</description>
      <pubDate>Wed, 14 Sep 2005 12:32:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-a-tar-file/m-p/3626036#M104822</guid>
      <dc:creator>Tim D Fulford</dc:creator>
      <dc:date>2005-09-14T12:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: create a tar file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-a-tar-file/m-p/3626037#M104823</link>
      <description>"pax" is an hpux utility.&lt;BR /&gt; &lt;BR /&gt;That is what this forum is about....&lt;BR /&gt; &lt;BR /&gt;Rod Hills</description>
      <pubDate>Wed, 14 Sep 2005 12:34:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-a-tar-file/m-p/3626037#M104823</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2005-09-14T12:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: create a tar file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-a-tar-file/m-p/3626038#M104824</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;'pax' exists on AIX too!  It's not just HP-UX.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;p.s. Thanks, Rodney :-)&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 14 Sep 2005 12:37:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-a-tar-file/m-p/3626038#M104824</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-09-14T12:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: create a tar file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/create-a-tar-file/m-p/3626039#M104825</link>
      <description>hi,&lt;BR /&gt;Other than copying ~/test to /tmp/test i also see one more solution that is to have small script which will cd to /tmp and then extract the tar file there.&lt;BR /&gt;&lt;BR /&gt;"tar cvf test.tar ./test/*"&lt;BR /&gt;&lt;BR /&gt;then provide that tar file alongwith thescript as :&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;cd /tmp&lt;BR /&gt;tar xvf test.tar&lt;BR /&gt;cd&lt;BR /&gt;&lt;BR /&gt;That's all.&lt;BR /&gt;regards,&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Sep 2005 14:49:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/create-a-tar-file/m-p/3626039#M104825</guid>
      <dc:creator>Bharat Katkar</dc:creator>
      <dc:date>2005-09-14T14:49:38Z</dc:date>
    </item>
  </channel>
</rss>

