<?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: copying directory structure in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057785#M138014</link>
    <description>Hi Claudio, i made a little mistake in the extraction part: &lt;BR /&gt;&lt;BR /&gt;should read&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;cd destination_base_dir&lt;BR /&gt;pax -rv &amp;lt; directory.pax&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;  Massimo&lt;BR /&gt;</description>
    <pubDate>Wed, 27 Aug 2003 12:41:07 GMT</pubDate>
    <dc:creator>Massimo Bianchi</dc:creator>
    <dc:date>2003-08-27T12:41:07Z</dc:date>
    <item>
      <title>copying directory structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057777#M138006</link>
      <description>Hello ,&lt;BR /&gt;&lt;BR /&gt;I need copy a directory structure from one poit to another  ; I've many direcory and sub-directory . I want also maintain owernships and permission.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Aug 2003 12:28:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057777#M138006</guid>
      <dc:creator>Claudio_17</dc:creator>
      <dc:date>2003-08-27T12:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: copying directory structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057778#M138007</link>
      <description>Use the find command with cpio:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;cd /source_dir&lt;BR /&gt;find . -print |cpio -pdumxl /target_dir&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Aug 2003 12:30:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057778#M138007</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-08-27T12:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: copying directory structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057779#M138008</link>
      <description>I will try this:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Creating the archive:&lt;BR /&gt;find . -type d -print | pax -w -d -f directory.pax&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;on the destination:&lt;BR /&gt;pax -r -f directory.pax&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;  Massimo</description>
      <pubDate>Wed, 27 Aug 2003 12:30:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057779#M138008</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-08-27T12:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: copying directory structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057780#M138009</link>
      <description>Claudio,&lt;BR /&gt;  You can use tar.&lt;BR /&gt;&lt;BR /&gt;  tar -cvf &lt;TAR_FILE_NAME&gt; &lt;DIR_NAME&gt;&lt;BR /&gt;&lt;BR /&gt;  untar in your destination dir&lt;BR /&gt;&lt;BR /&gt;  tar -xvf &lt;TAR_FILE_NAME&gt;&lt;BR /&gt;&lt;BR /&gt;  man tar for more details.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Umapathy&lt;/TAR_FILE_NAME&gt;&lt;/DIR_NAME&gt;&lt;/TAR_FILE_NAME&gt;</description>
      <pubDate>Wed, 27 Aug 2003 12:31:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057780#M138009</guid>
      <dc:creator>Umapathy S</dc:creator>
      <dc:date>2003-08-27T12:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: copying directory structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057781#M138010</link>
      <description>Do you need the directory structure only, or do you also need the files in the directories?  When you one point to another, do you mean on the same system, or from one system to another?&lt;BR /&gt;&lt;BR /&gt;To copy a directory structure and all files and sub-dirs to another spot on the same machine:&lt;BR /&gt;&lt;BR /&gt;# cp -Rp /dir/to/copy /destination/dir&lt;BR /&gt;&lt;BR /&gt;If you need to transfer to another machine, I'd use tar.&lt;BR /&gt;&lt;BR /&gt;# cd /dir/to/copy&lt;BR /&gt;# tar -cvf dir_file.tar .&lt;BR /&gt;&lt;BR /&gt;If you just need the directory structure, I can't think of a good way offhand.</description>
      <pubDate>Wed, 27 Aug 2003 12:31:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057781#M138010</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2003-08-27T12:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: copying directory structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057782#M138011</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Use&lt;BR /&gt;&lt;BR /&gt;cp -r sourceidr targetdir&lt;BR /&gt;&lt;BR /&gt;targetdir should not already exist&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jeff</description>
      <pubDate>Wed, 27 Aug 2003 12:33:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057782#M138011</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2003-08-27T12:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: copying directory structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057783#M138012</link>
      <description>I need copy a directory structure ; only dir , not files . And is from one system to another , but in target system I've same user/group so is not and UID/GID problem &lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Aug 2003 12:34:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057783#M138012</guid>
      <dc:creator>Claudio_17</dc:creator>
      <dc:date>2003-08-27T12:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: copying directory structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057784#M138013</link>
      <description>OK, then:&lt;BR /&gt;&lt;BR /&gt;cd /source_dir&lt;BR /&gt;&lt;BR /&gt;find . -type d |cpio -pdumxl /target_dir&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Aug 2003 12:40:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057784#M138013</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-08-27T12:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: copying directory structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057785#M138014</link>
      <description>Hi Claudio, i made a little mistake in the extraction part: &lt;BR /&gt;&lt;BR /&gt;should read&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;cd destination_base_dir&lt;BR /&gt;pax -rv &amp;lt; directory.pax&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;  Massimo&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Aug 2003 12:41:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057785#M138014</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-08-27T12:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: copying directory structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057786#M138015</link>
      <description>Hi,&lt;BR /&gt;Try&lt;BR /&gt;find . -type d -print |cpio -pdvmux /&lt;DEST_DIR&gt;&lt;/DEST_DIR&gt;</description>
      <pubDate>Wed, 27 Aug 2003 12:41:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057786#M138015</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2003-08-27T12:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: copying directory structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057787#M138016</link>
      <description>Thanks very much to all ; sorry I didn't specify copy was between two box&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Aug 2003 12:45:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057787#M138016</guid>
      <dc:creator>Claudio_17</dc:creator>
      <dc:date>2003-08-27T12:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: copying directory structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057788#M138017</link>
      <description>Hi (again) Claudio,&lt;BR /&gt;&lt;BR /&gt;Well if it's between systems &amp;amp; it's a one-time shot, then I'd just use tar &amp;amp; ftp&lt;BR /&gt;&lt;BR /&gt;On host1:&lt;BR /&gt;tar cvf /tmp/dir_name.tar /dir_name&lt;BR /&gt;ftp host2&lt;BR /&gt;&amp;gt;put /tmp/dir_name.tar /tmp/dir_name.tar&lt;BR /&gt;&lt;BR /&gt;On host2&lt;BR /&gt;tar xvf /tmp/dir_name.tar&lt;BR /&gt;&lt;BR /&gt;Make sure /tmp has enough space - if not use a holding dir that does. This will preserve ownership (provided host2 has the user(s) defined) &amp;amp; permissions.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Jeff</description>
      <pubDate>Wed, 27 Aug 2003 12:58:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057788#M138017</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2003-08-27T12:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: copying directory structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057789#M138018</link>
      <description>here's a nice one i use to copy files from one system to another :&lt;BR /&gt;&lt;BR /&gt;cp_dir()&lt;BR /&gt;{&lt;BR /&gt;  source_dir=$1&lt;BR /&gt;  target_dir=$2&lt;BR /&gt;  target_host=$3&lt;BR /&gt;&lt;BR /&gt;  cd ${source_dir} ; tar cf - . |&lt;BR /&gt;  rexec ${target_host} -l root   "cd ${target_dir} ; tar xpf -"&lt;BR /&gt;  cd -&lt;BR /&gt;}&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Aug 2003 13:51:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057789#M138018</guid>
      <dc:creator>hein coulier</dc:creator>
      <dc:date>2003-08-27T13:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: copying directory structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057790#M138019</link>
      <description>I use the following for large amounts of data-&lt;BR /&gt;&lt;BR /&gt;fbackup -f - -i /path1 -i /path2 | compress -c | ( remsh otherhost "cd /newpath ; zcat - | frecover -Xx -f - )&lt;BR /&gt;&lt;BR /&gt;Where-&lt;BR /&gt;/path1,/path2 are the directories to copy&lt;BR /&gt;otherhost is the remote host name&lt;BR /&gt;/newpath is where the directories are to be copied&lt;BR /&gt;&lt;BR /&gt;The benefits-&lt;BR /&gt;Any ACL info is maintained, and with "compress" the amount of data across the network is kept to a minimum. With fbackup I can select multiple paths, whereas tar is relative to the current working directory.&lt;BR /&gt;&lt;BR /&gt;Downside-&lt;BR /&gt;Dependent on "r" commands (remsh,rlogin,rexec) which are not the most secure.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Wed, 27 Aug 2003 14:06:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copying-directory-structure/m-p/3057790#M138019</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2003-08-27T14:06:43Z</dc:date>
    </item>
  </channel>
</rss>

