<?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: tar in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314345#M339828</link>
    <description>Hi Anjaneyulu,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;I want to copy the files from /home/anji to a1 directory&amp;lt;&amp;lt;&lt;BR /&gt;&lt;BR /&gt;First copy all the files from /home/anji and stored in /tmp/anji.tar&lt;BR /&gt;&lt;BR /&gt;#tar -cvf /tmp/anji.tar /home/anji&lt;BR /&gt;&lt;BR /&gt;Now goto the directory wherever you want to restore. Then extract the file.&lt;BR /&gt;&lt;BR /&gt;#cd /tmp/a&lt;BR /&gt;#tar -xvf /tmp/anji.tar&lt;BR /&gt;&lt;BR /&gt;It will restore all the files in /tmp/a directory.&lt;BR /&gt;</description>
    <pubDate>Thu, 27 Nov 2008 13:12:42 GMT</pubDate>
    <dc:creator>Ganesan R</dc:creator>
    <dc:date>2008-11-27T13:12:42Z</dc:date>
    <item>
      <title>tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314339#M339822</link>
      <description>hi problem with tar command.&lt;BR /&gt;&lt;BR /&gt;i created two files in /home directory as 1 2.&lt;BR /&gt;after that i create one directory as a. Iam trying to restore the files in a directory.&lt;BR /&gt;&lt;BR /&gt;tar cvf files.tar 1 2 a&lt;BR /&gt;cd a&lt;BR /&gt;tar xvf files.tar a&lt;BR /&gt;It gives the error like &lt;BR /&gt;tar: files.tar: No such file or directory&lt;BR /&gt;&lt;BR /&gt;Please help me.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Nov 2008 12:39:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314339#M339822</guid>
      <dc:creator>Anjaneyulu</dc:creator>
      <dc:date>2008-11-27T12:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314340#M339823</link>
      <description>&lt;BR /&gt; Dear Anjaneyulu,&lt;BR /&gt;&lt;BR /&gt;   where you are going take a backup for using tar.&lt;BR /&gt;&lt;BR /&gt;  for examble u use the below method.&lt;BR /&gt;&lt;BR /&gt; login to the home directory.&lt;BR /&gt;&lt;BR /&gt;cd /home&lt;BR /&gt;home&amp;gt; tar -cvf files.tar 1 2 a&lt;BR /&gt;&lt;BR /&gt;it's stored in the same home directory.like files.tar and remove it the exitsting directory.&lt;BR /&gt;&lt;BR /&gt;then,&lt;BR /&gt;&lt;BR /&gt;home&amp;gt; tar -xvf files.tar a &lt;BR /&gt;&lt;BR /&gt;it will restore the mentioned directory.&lt;BR /&gt;&lt;BR /&gt;u try this and revert back.....&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Unixguy.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Nov 2008 12:48:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314340#M339823</guid>
      <dc:creator>unixguy_1</dc:creator>
      <dc:date>2008-11-27T12:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314341#M339824</link>
      <description>Hi Anjaneyulu,&lt;BR /&gt;&lt;BR /&gt;here the steps to follow.&lt;BR /&gt;tar options (destination) (source)&lt;BR /&gt;#tar cvf file.tar 1 2 &lt;BR /&gt;#cd a&lt;BR /&gt;#tar xvf file.tar .&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Nov 2008 12:48:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314341#M339824</guid>
      <dc:creator>Analyst</dc:creator>
      <dc:date>2008-11-27T12:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314342#M339825</link>
      <description>I followed your commands.&lt;BR /&gt;&lt;BR /&gt;But it shows same error.&lt;BR /&gt;&lt;BR /&gt;I want to copy the files from /home/anji to a1 directory</description>
      <pubDate>Thu, 27 Nov 2008 13:02:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314342#M339825</guid>
      <dc:creator>Anjaneyulu</dc:creator>
      <dc:date>2008-11-27T13:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314343#M339826</link>
      <description>&amp;gt; tar xvf files.tar a&lt;BR /&gt;&amp;gt; It gives the error like &lt;BR /&gt;&amp;gt; tar: files.tar: No such file or directory&lt;BR /&gt;&lt;BR /&gt;After you did 'cd a'. you don't have to again specify 'tar xvf file.tar a'. Just specify 'tar xvf files.tar' (inside 'a' dir)&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Nov 2008 13:05:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314343#M339826</guid>
      <dc:creator>Venkatesh BL</dc:creator>
      <dc:date>2008-11-27T13:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314344#M339827</link>
      <description>$ tar xvf file.tar&lt;BR /&gt;tar: file.tar: No such file or directory&lt;BR /&gt;&lt;BR /&gt;It gives above error in dirctory a.</description>
      <pubDate>Thu, 27 Nov 2008 13:11:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314344#M339827</guid>
      <dc:creator>Anjaneyulu</dc:creator>
      <dc:date>2008-11-27T13:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314345#M339828</link>
      <description>Hi Anjaneyulu,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;I want to copy the files from /home/anji to a1 directory&amp;lt;&amp;lt;&lt;BR /&gt;&lt;BR /&gt;First copy all the files from /home/anji and stored in /tmp/anji.tar&lt;BR /&gt;&lt;BR /&gt;#tar -cvf /tmp/anji.tar /home/anji&lt;BR /&gt;&lt;BR /&gt;Now goto the directory wherever you want to restore. Then extract the file.&lt;BR /&gt;&lt;BR /&gt;#cd /tmp/a&lt;BR /&gt;#tar -xvf /tmp/anji.tar&lt;BR /&gt;&lt;BR /&gt;It will restore all the files in /tmp/a directory.&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Nov 2008 13:12:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314345#M339828</guid>
      <dc:creator>Ganesan R</dc:creator>
      <dc:date>2008-11-27T13:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314346#M339829</link>
      <description>&lt;I followed="" your="" commands.=""&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BUT it="" shows="" same="" error.=""&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;I want="" to="" copy="" the="" files="" from=""&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hi Anjaneyulu,&lt;BR /&gt;&lt;BR /&gt;  Better u login to that directory.&lt;BR /&gt;&lt;BR /&gt;cd /home/anji&lt;BR /&gt;&lt;BR /&gt;home/anji&amp;gt; tar * files.tar&lt;BR /&gt;&lt;BR /&gt;then that a1 directory is in home,login into a1.&lt;BR /&gt;&lt;BR /&gt;home/anji&amp;gt;cp files.tar /home/a1&lt;BR /&gt;&lt;BR /&gt;cd ..&lt;BR /&gt;&lt;BR /&gt;cd a1&lt;BR /&gt;&lt;BR /&gt;home/a1&amp;gt; tar -xvf files.tar&lt;BR /&gt;&lt;BR /&gt;Hope now u r understood.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Unixguy.&lt;BR /&gt;&lt;BR /&gt;  &lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/I&gt;&lt;/BUT&gt;&lt;/I&gt;</description>
      <pubDate>Thu, 27 Nov 2008 13:13:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314346#M339829</guid>
      <dc:creator>unixguy_1</dc:creator>
      <dc:date>2008-11-27T13:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314347#M339830</link>
      <description>you must not reside in the directory where you wanna restore files.&lt;BR /&gt;&lt;BR /&gt;don't cd to a directory&lt;BR /&gt;&lt;BR /&gt;cd to previous directory from where you taken the tar files and run command&lt;BR /&gt;&lt;BR /&gt;#tar xvf files.tar a/</description>
      <pubDate>Thu, 27 Nov 2008 13:18:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314347#M339830</guid>
      <dc:creator>Jeeshan</dc:creator>
      <dc:date>2008-11-27T13:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314348#M339831</link>
      <description>Well, it's very simple :&lt;BR /&gt;&lt;BR /&gt;tar cvf files.tar 1 2 a&lt;BR /&gt;cd a&lt;BR /&gt;tar xvf ../files.tar a&lt;BR /&gt;&lt;BR /&gt;Since you create "files.tar" in the local directory and then do "cd" to a subdirectory, you have to go to the directory above to find your tar file.</description>
      <pubDate>Thu, 27 Nov 2008 13:19:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314348#M339831</guid>
      <dc:creator>Wim Rombauts</dc:creator>
      <dc:date>2008-11-27T13:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314349#M339832</link>
      <description>&lt;BR /&gt;&amp;gt; tar cvf files.tar 1 2 a&lt;BR /&gt;&lt;BR /&gt;As 'a' is the destination directory, that should not be specified during 'archival'&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;&lt;BR /&gt;# ls&lt;BR /&gt;a.c    a.out  a1     a1.c   a2     a2.c   aa.c   test   &lt;BR /&gt;# tar -cvf a.tar a.c a1.c&lt;BR /&gt;a a.c 4 blocks&lt;BR /&gt;a a1.c 2 blocks&lt;BR /&gt;&lt;BR /&gt;# mkdir xyz&lt;BR /&gt;# ls xyz&lt;BR /&gt;# mv a.tar xyz&lt;BR /&gt;# cd xyz&lt;BR /&gt;# tar -xvf a.tar&lt;BR /&gt;x a.c, 1631 bytes, 4 tape blocks&lt;BR /&gt;x a1.c, 781 bytes, 2 tape blocks&lt;BR /&gt;# ls&lt;BR /&gt;a.c    a.tar  a1.c&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Nov 2008 13:21:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314349#M339832</guid>
      <dc:creator>Venkatesh BL</dc:creator>
      <dc:date>2008-11-27T13:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314350#M339833</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;'tar cvf files.tar 1 2'&lt;BR /&gt;'mv files.tar a'&lt;BR /&gt;'cd a'&lt;BR /&gt;'tar xvf files.tar'&lt;BR /&gt;&lt;BR /&gt;OR simply:&lt;BR /&gt;&lt;BR /&gt;'mv 1 a'&lt;BR /&gt;'mv 2 a'&lt;BR /&gt;'cd a'&lt;BR /&gt;&lt;BR /&gt;OR&lt;BR /&gt;&lt;BR /&gt;'tar cvf a/files.tar 1 2'&lt;BR /&gt;'cd a'&lt;BR /&gt;'tar xvf files.tar'&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;Volkmar&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Nov 2008 13:34:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314350#M339833</guid>
      <dc:creator>V. Nyga</dc:creator>
      <dc:date>2008-11-27T13:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314351#M339834</link>
      <description>Hi ,&lt;BR /&gt;&lt;BR /&gt;Pls try to understand the below ex.&lt;BR /&gt;&lt;BR /&gt;1)tar - cvf /tmp/file.tar /home/pr/A/*&lt;BR /&gt;suppose i m going to diff directory&lt;BR /&gt;cd /home/qt&lt;BR /&gt;and run the below command&lt;BR /&gt;tar - xvf /tmp/file.tar&lt;BR /&gt;it will extarct the file in /home/xospnw01/A&lt;BR /&gt;============================================&lt;BR /&gt;now second example&lt;BR /&gt;cd /home/pr/A&lt;BR /&gt;tar - cvf /tmp/file.tar ./*&lt;BR /&gt;cd /home/qt&lt;BR /&gt;tar -xvf /tmp/file.tar&lt;BR /&gt;it will extact the file in /home/qt&lt;BR /&gt;&lt;BR /&gt;==============================&lt;BR /&gt;If u r using the absolute path for doing the tar then u can extarct in the same path only.&lt;BR /&gt;=================================&lt;BR /&gt;if u r using relatve path for taring then u can exatrct in any path.&lt;BR /&gt;&lt;BR /&gt;Hope u will underastand the concept&lt;BR /&gt;&lt;BR /&gt;Reagrds&lt;BR /&gt;Prashant&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Nov 2008 14:01:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314351#M339834</guid>
      <dc:creator>Prashanth Waugh</dc:creator>
      <dc:date>2008-11-27T14:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314352#M339835</link>
      <description>&lt;!--!*#--&gt;&amp;gt; I want to copy the files from /home/anji to&lt;BR /&gt;&amp;gt; a1 directory&lt;BR /&gt;&lt;BR /&gt;Why didn't you say so at the beginning?&lt;BR /&gt;&lt;BR /&gt;mkdir a   # If needed.&lt;BR /&gt;( cd /home/anji ; tar cf - . ) | \&lt;BR /&gt; ( cd a ; tar xf - )&lt;BR /&gt;&lt;BR /&gt;There's no real need to create a "files.tar".</description>
      <pubDate>Thu, 27 Nov 2008 14:53:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314352#M339835</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2008-11-27T14:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314353#M339836</link>
      <description>Hi ,&lt;BR /&gt;small correction here&lt;BR /&gt;&lt;BR /&gt;1)tar - cvf /tmp/file.tar /home/pr/A/*&lt;BR /&gt;suppose i m going to diff directory&lt;BR /&gt;cd /home/qt&lt;BR /&gt;and run the below command&lt;BR /&gt;tar - xvf /tmp/file.tar&lt;BR /&gt;it will extarct the file in /home/pr/A&lt;BR /&gt;&lt;BR /&gt;RegARDS&lt;BR /&gt;pRASHANT</description>
      <pubDate>Thu, 27 Nov 2008 15:41:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314353#M339836</guid>
      <dc:creator>Prashanth Waugh</dc:creator>
      <dc:date>2008-11-27T15:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: tar</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314354#M339837</link>
      <description>steven's solution is right on target...&lt;BR /&gt;&lt;BR /&gt;and, of course, an example of that solution can be found in "man tar", had the original poster read it.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 28 Nov 2008 18:21:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar/m-p/4314354#M339837</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2008-11-28T18:21:41Z</dc:date>
    </item>
  </channel>
</rss>

