<?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>question How to copy files recursive from HDFS to a local folder? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-copy-files-recursive-from-HDFS-to-a-local-folder/m-p/234909#M196729</link>
    <description>&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;The simple way to copy a folder from HDFS to a local folder is like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;su hdfs -c 'hadoop fs -copyToLocal /hdp /tmp'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In the example above, we copy the &lt;CODE&gt;hdp&lt;/CODE&gt; folder from HDFS to &lt;CODE&gt;/tmp/local_folder&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;But we have a more complicated case. Let’s say under &lt;CODE&gt;/hdp ( hdfs )&lt;/CODE&gt;, we have subfolders:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;CODE&gt;/hdp/folder1
/hdp/folder2
/hdp/folder3/folder_a
.
.
.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;And in each sub folder we have files.&lt;/P&gt;&lt;P&gt;In that case, how to copy recursively only the files under &lt;CODE&gt;/hdp&lt;/CODE&gt; to the local dir &lt;CODE&gt;/tmp/local_folder&lt;/CODE&gt;?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 26 Feb 2019 06:50:41 GMT</pubDate>
    <dc:creator>mike_bronson7</dc:creator>
    <dc:date>2019-02-26T06:50:41Z</dc:date>
  </channel>
</rss>

