<?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: Copy directory structure in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/copy-directory-structure/m-p/4991922#M422479</link>
    <description>That's because you are using the wrong tool. The following will copy the directory structure (only directories) and leave the modes and ownership intact.&lt;BR /&gt;&lt;BR /&gt;1) cd to desired starting point in the source tree&lt;BR /&gt;2) find . -type d -print | cpio -ocv &amp;gt; /var/tmp/cpio.dat&lt;BR /&gt;&lt;BR /&gt;3) cd to directory above the desired destination tree.&lt;BR /&gt;4) mkdir mynewdir # or whatever&lt;BR /&gt;   chmod 750 mynewdir # or whatever&lt;BR /&gt;   chown me:mygroup mynewdir # or whatever&lt;BR /&gt;5) cd mynewdir # or whatever&lt;BR /&gt;6) cpio -icvdum &amp;lt; /var/tmp/cpio.dat&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 19 Jul 2006 11:09:38 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2006-07-19T11:09:38Z</dc:date>
    <item>
      <title>Copy directory structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copy-directory-structure/m-p/4991920#M422477</link>
      <description>I'm trying to copy only the directory structure and not the files within.&lt;BR /&gt;&lt;BR /&gt;Can't seem to find the proper "cp" option to perform this task.&lt;BR /&gt;&lt;BR /&gt;Thanks,</description>
      <pubDate>Wed, 19 Jul 2006 10:58:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copy-directory-structure/m-p/4991920#M422477</guid>
      <dc:creator>Rafael Casero</dc:creator>
      <dc:date>2006-07-19T10:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Copy directory structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copy-directory-structure/m-p/4991921#M422478</link>
      <description>How about something like this:&lt;BR /&gt;&lt;BR /&gt;for i in `find /start_dir -type d`&lt;BR /&gt;do&lt;BR /&gt;mkdir $i&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Wed, 19 Jul 2006 11:07:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copy-directory-structure/m-p/4991921#M422478</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2006-07-19T11:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Copy directory structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copy-directory-structure/m-p/4991922#M422479</link>
      <description>That's because you are using the wrong tool. The following will copy the directory structure (only directories) and leave the modes and ownership intact.&lt;BR /&gt;&lt;BR /&gt;1) cd to desired starting point in the source tree&lt;BR /&gt;2) find . -type d -print | cpio -ocv &amp;gt; /var/tmp/cpio.dat&lt;BR /&gt;&lt;BR /&gt;3) cd to directory above the desired destination tree.&lt;BR /&gt;4) mkdir mynewdir # or whatever&lt;BR /&gt;   chmod 750 mynewdir # or whatever&lt;BR /&gt;   chown me:mygroup mynewdir # or whatever&lt;BR /&gt;5) cd mynewdir # or whatever&lt;BR /&gt;6) cpio -icvdum &amp;lt; /var/tmp/cpio.dat&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 19 Jul 2006 11:09:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copy-directory-structure/m-p/4991922#M422479</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-07-19T11:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: Copy directory structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copy-directory-structure/m-p/4991923#M422480</link>
      <description>you can also simply do this&lt;BR /&gt;&lt;BR /&gt;find /start_dir -type d -exec mkdir -p /top_destination_dir/{} \;&lt;BR /&gt;&lt;BR /&gt;that'll create your directory structure in one fell swoop</description>
      <pubDate>Wed, 19 Jul 2006 11:14:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copy-directory-structure/m-p/4991923#M422480</guid>
      <dc:creator>Wessam Aly</dc:creator>
      <dc:date>2006-07-19T11:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: Copy directory structure</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/copy-directory-structure/m-p/4991924#M422481</link>
      <description>A_Clay was the answer to my question.&lt;BR /&gt;&lt;BR /&gt;I was not able to make the one swoop command work.&lt;BR /&gt;&lt;BR /&gt;Thanks, to all...</description>
      <pubDate>Wed, 19 Jul 2006 12:54:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/copy-directory-structure/m-p/4991924#M422481</guid>
      <dc:creator>Rafael Casero</dc:creator>
      <dc:date>2006-07-19T12:54:29Z</dc:date>
    </item>
  </channel>
</rss>

