<?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: rsync - excluding directories in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/rsync-excluding-directories/m-p/4794939#M44467</link>
    <description>did you supply the -r or -a flag in the rsync command?&lt;BR /&gt;&lt;BR /&gt;that is a normal behavior for rsync. Best bet would be to cd into the dir/sub dir first, then do a rsync *.txt dest:/dir&lt;BR /&gt;</description>
    <pubDate>Thu, 02 Jun 2011 22:01:39 GMT</pubDate>
    <dc:creator>Wilfred Chau_1</dc:creator>
    <dc:date>2011-06-02T22:01:39Z</dc:date>
    <item>
      <title>rsync - excluding directories</title>
      <link>https://community.hpe.com/t5/operating-system-linux/rsync-excluding-directories/m-p/4794938#M44466</link>
      <description>Hi there&lt;BR /&gt;I need to copy all the .txt files from certain directory and it's subdirectories preserving timestamps permissions etc.&lt;BR /&gt;Rsync is great for that but I ccan't find out how to tell it not  to copy the directories - just the files.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;</description>
      <pubDate>Thu, 02 Jun 2011 14:59:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/rsync-excluding-directories/m-p/4794938#M44466</guid>
      <dc:creator>Piotr Kirklewski</dc:creator>
      <dc:date>2011-06-02T14:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: rsync - excluding directories</title>
      <link>https://community.hpe.com/t5/operating-system-linux/rsync-excluding-directories/m-p/4794939#M44467</link>
      <description>did you supply the -r or -a flag in the rsync command?&lt;BR /&gt;&lt;BR /&gt;that is a normal behavior for rsync. Best bet would be to cd into the dir/sub dir first, then do a rsync *.txt dest:/dir&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Jun 2011 22:01:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/rsync-excluding-directories/m-p/4794939#M44467</guid>
      <dc:creator>Wilfred Chau_1</dc:creator>
      <dc:date>2011-06-02T22:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: rsync - excluding directories</title>
      <link>https://community.hpe.com/t5/operating-system-linux/rsync-excluding-directories/m-p/4794940#M44468</link>
      <description>Assuming transfer is from a remote host to local, you could try a kludge like this:&lt;BR /&gt;dir=$(mktemp -d) &amp;amp;&amp;amp; rsync -a --include '*/' --include='*.txt' --exclude='*' SOURCEHOST:/SOURCEDIR/ $dir &amp;amp;&amp;amp; find $dir -type f -exec mv {} TARGETDIR \; &amp;amp;&amp;amp; rm -rf $dir</description>
      <pubDate>Fri, 03 Jun 2011 16:55:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/rsync-excluding-directories/m-p/4794940#M44468</guid>
      <dc:creator>Jared Middleton</dc:creator>
      <dc:date>2011-06-03T16:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: rsync - excluding directories</title>
      <link>https://community.hpe.com/t5/operating-system-linux/rsync-excluding-directories/m-p/4794941#M44469</link>
      <description>What do you mean by excluding directories?  Did you want to flatten the directory structure?</description>
      <pubDate>Sat, 04 Jun 2011 18:27:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/rsync-excluding-directories/m-p/4794941#M44469</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-06-04T18:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: rsync - excluding directories</title>
      <link>https://community.hpe.com/t5/operating-system-linux/rsync-excluding-directories/m-p/4794942#M44470</link>
      <description>&lt;!--!*#--&gt;&amp;gt; What do you mean by excluding directories?&lt;BR /&gt;&amp;gt; Did you want to flatten the directory&lt;BR /&gt;&amp;gt; structure?&lt;BR /&gt;&lt;BR /&gt;That was my guess.  As usual, showing an&lt;BR /&gt;actual example might be more helpful than a&lt;BR /&gt;vague description.&lt;BR /&gt;&lt;BR /&gt;If you're not wedded to rsync, then the&lt;BR /&gt;Info-ZIP Zip and UnZip programs (both) offer&lt;BR /&gt;a "-j" option to avoid storing or restoring&lt;BR /&gt;directories.  I'd also expect that GNU "tar"&lt;BR /&gt;options like --strip-components and/or&lt;BR /&gt;--transform should be able to do the job at&lt;BR /&gt;extraction.  Either way, it should be&lt;BR /&gt;possible to preserve the date-time, UID+GID,&lt;BR /&gt;and permission info.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.gnu.org/software/tar/manual/html_node/transform.html" target="_blank"&gt;http://www.gnu.org/software/tar/manual/html_node/transform.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] it's subdirectories [...]&lt;BR /&gt;&lt;BR /&gt;That's "its subdirectories".</description>
      <pubDate>Sat, 04 Jun 2011 20:30:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/rsync-excluding-directories/m-p/4794942#M44470</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2011-06-04T20:30:21Z</dc:date>
    </item>
  </channel>
</rss>

