<?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 question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/3556966#M225899</link>
    <description>Hey;&lt;BR /&gt;&lt;BR /&gt;Not quite but very close.  You want to cd into the source directory; otherwise, you'll end up with /dest/source_dir/file# instead of /dest/file#.&lt;BR /&gt;&lt;BR /&gt;So, the full, correct syntax:&lt;BR /&gt;&lt;BR /&gt;cd /source&lt;BR /&gt;tar -cf - . | (cd /dest; tar -xf -)&lt;BR /&gt;&lt;BR /&gt;Without the -v, you won't see the file names as they get processed.  If you want to see them, put the -v in one and only one of the tar commands, otherwise you'll see the filenames twice...&lt;BR /&gt;&lt;BR /&gt;HTH;&lt;BR /&gt;&lt;BR /&gt;Doug&lt;BR /&gt;</description>
    <pubDate>Thu, 02 Jun 2005 16:17:53 GMT</pubDate>
    <dc:creator>Doug O'Leary</dc:creator>
    <dc:date>2005-06-02T16:17:53Z</dc:date>
    <item>
      <title>Tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/3556961#M225894</link>
      <description>I need help with tar please.  How do I tar up a bunch of files but at the same time untar it to another filesystem?  That way I don't have to tar a directory.  And then untar when its all done to that location?&lt;BR /&gt;&lt;BR /&gt;Thanks - Angie</description>
      <pubDate>Thu, 02 Jun 2005 16:05:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/3556961#M225894</guid>
      <dc:creator>Angie_1</dc:creator>
      <dc:date>2005-06-02T16:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: Tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/3556962#M225895</link>
      <description>Generally that a task a bit better suited to cpio using the pass (-p) option; some thing like this:&lt;BR /&gt;&lt;BR /&gt;cd to desired source dir:&lt;BR /&gt;find . -print | cpio -pudvm /xxx/yyy/zzz where /xxx/yyy/zzz is the destination directory/filesystem.</description>
      <pubDate>Thu, 02 Jun 2005 16:07:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/3556962#M225895</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-06-02T16:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: Tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/3556963#M225896</link>
      <description>tar -cvf - /source_dir/file1 /source_dir/file2 | (cd /dest;tar -xvf -)&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Thu, 02 Jun 2005 16:08:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/3556963#M225896</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-06-02T16:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: Tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/3556964#M225897</link>
      <description>This assumes you have remsh access from your SOURCE system to the DESTINATION system.&lt;BR /&gt;&lt;BR /&gt;On the SOURCE system:&lt;BR /&gt;&lt;BR /&gt;# cd /dir&lt;BR /&gt;# tar -cf - . | remsh DESTINATION "cd /dest_dir ; tar -xf -"&lt;BR /&gt;&lt;BR /&gt;This could also be done if you have SSH access between the 2 systems.&lt;BR /&gt;&lt;BR /&gt;# cd /dir&lt;BR /&gt;# tar -cf - . | ssh DESTINATION "cd /dest_dir ; tar -xf -"&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Jun 2005 16:11:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/3556964#M225897</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2005-06-02T16:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: Tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/3556965#M225898</link>
      <description>I should have been more clear.&lt;BR /&gt;Both NFS filesystems are mounted on this server.&lt;BR /&gt;&lt;BR /&gt;So I need to tar up a directory on one filesystem and untar it to the other location.&lt;BR /&gt;&lt;BR /&gt;So is this below correct?  Why the "-" after "-cvf" and "-xvf"?&lt;BR /&gt;&lt;BR /&gt;Angie&lt;BR /&gt;&lt;BR /&gt;tar -cvf - /source_dir/file1 /source_dir/file2 | (cd /dest;tar -xvf -)&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Jun 2005 16:14:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/3556965#M225898</guid>
      <dc:creator>Angie_1</dc:creator>
      <dc:date>2005-06-02T16:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: Tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/3556966#M225899</link>
      <description>Hey;&lt;BR /&gt;&lt;BR /&gt;Not quite but very close.  You want to cd into the source directory; otherwise, you'll end up with /dest/source_dir/file# instead of /dest/file#.&lt;BR /&gt;&lt;BR /&gt;So, the full, correct syntax:&lt;BR /&gt;&lt;BR /&gt;cd /source&lt;BR /&gt;tar -cf - . | (cd /dest; tar -xf -)&lt;BR /&gt;&lt;BR /&gt;Without the -v, you won't see the file names as they get processed.  If you want to see them, put the -v in one and only one of the tar commands, otherwise you'll see the filenames twice...&lt;BR /&gt;&lt;BR /&gt;HTH;&lt;BR /&gt;&lt;BR /&gt;Doug&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Jun 2005 16:17:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/3556966#M225899</guid>
      <dc:creator>Doug O'Leary</dc:creator>
      <dc:date>2005-06-02T16:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: Tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/3556967#M225900</link>
      <description>Doug,&lt;BR /&gt;&lt;BR /&gt;Thank you for clarifying.&lt;BR /&gt;Now one last question... to find out how much was tarred/untarred... is there a simple way to do this (in megs)?  Or how do you get the results at the end?&lt;BR /&gt;&lt;BR /&gt;Angie</description>
      <pubDate>Thu, 02 Jun 2005 16:24:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/3556967#M225900</guid>
      <dc:creator>Angie_1</dc:creator>
      <dc:date>2005-06-02T16:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/3556968#M225901</link>
      <description>Hey again;&lt;BR /&gt;&lt;BR /&gt;If you were creating a regular tar ball, you could simply examine the size of the resulting file.  In this case, since you're immediately extracting the tar, the best easiest way would be to simply:&lt;BR /&gt;&lt;BR /&gt;du -sk /dest&lt;BR /&gt;&lt;BR /&gt;That will give the size of the resulting dest dir in K; divide by 1024 to get megs.&lt;BR /&gt;&lt;BR /&gt;BTW, to answer your other question that I missed -f - means to create the tar file to standard out or extract it from standard in.  &lt;BR /&gt;&lt;BR /&gt;HTH;&lt;BR /&gt;&lt;BR /&gt;Doug</description>
      <pubDate>Thu, 02 Jun 2005 21:01:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/3556968#M225901</guid>
      <dc:creator>Doug O'Leary</dc:creator>
      <dc:date>2005-06-02T21:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Tar question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/3556969#M225902</link>
      <description>You say you're using NFS. Though NFS is VERY handy (I use it all the time), it is also very slow, especially when writing.&lt;BR /&gt;&lt;BR /&gt;All the answers given (except the remsh and ssh one's), cd to the source dir, and then write to the dest dir, probably assuming the server you work on is the one that has the dest dir mounted NFS&lt;BR /&gt;&lt;BR /&gt;It will be extremely much faster -- if the NFS is two way -- to do this on the receiving server, where the source dir is on the mounted NFS. Read ops don't lock as much as write ops, and locking is the most expensive NFS operation.&lt;BR /&gt;&lt;BR /&gt;my options:&lt;BR /&gt;1. ssh&lt;BR /&gt;2. remsh&lt;BR /&gt;3. rcp (make a tar on machine 1, untar on machine 2)&lt;BR /&gt;4. NFS&lt;BR /&gt;&lt;BR /&gt;Then as last tip, you can speed up the extraction by adding a dd to better stream the data, where dd just acts as a buffer&lt;BR /&gt;&lt;BR /&gt;# cd dest&lt;BR /&gt;# ( cd source ; tar cf - . ) | dd | tar xvf -&lt;BR /&gt;&lt;BR /&gt;Do not use -v on both ends. Then you will get all the files listed twice&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Fri, 03 Jun 2005 01:42:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/tar-question/m-p/3556969#M225902</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-06-03T01:42:36Z</dc:date>
    </item>
  </channel>
</rss>

