<?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 Re: Hadoop filesystem Commands in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hadoop-filesystem-Commands/m-p/204811#M71406</link>
    <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/1271/sheltong.html" nodeid="1271"&gt;@Geoffrey Shelton Okot&lt;/A&gt;. This is what I'm looking for.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Nov 2017 21:13:23 GMT</pubDate>
    <dc:creator>balavignesh_nag</dc:creator>
    <dc:date>2017-11-16T21:13:23Z</dc:date>
    <item>
      <title>Hadoop filesystem Commands</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hadoop-filesystem-Commands/m-p/204808#M71403</link>
      <description>&lt;P&gt;What does hadoop fs -test do?&lt;/P&gt;&lt;P&gt;What are the other set of options which can be used along with -test like hadoop fs -test -d.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 19:23:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hadoop-filesystem-Commands/m-p/204808#M71403</guid>
      <dc:creator>balavignesh_nag</dc:creator>
      <dc:date>2017-11-16T19:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Hadoop filesystem Commands</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hadoop-filesystem-Commands/m-p/204809#M71404</link>
      <description>&lt;P&gt;&lt;EM&gt;@&lt;A href="https://community.hortonworks.com/users/12437/balavigneshnagamuthuvenkatesan.html"&gt;Bala Vignesh N V&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;hadoop fs&lt;/STRONG&gt; has been deprecated, From hadoop 2.0 use &lt;STRONG&gt;hdfs dfs&lt;/STRONG&gt; instead.Having said that &lt;STRONG&gt;hadoop fs -test -[defsz] URI &lt;/STRONG&gt;is used to check the hdfs and it takes the below options: &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;-d: f the path is a directory, return 0. 
-e: if the path exists, return 0. 
-f: if the path is a file, return 0. 
-s: if the path is not empty, return 0. 
-z: if the file is zero length, return 0.&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Example &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Check for valid directories in hdfs &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;$ hdfs dfs -ls /
Found 7 items
drwxrwx---   - ambari-qa hdfs          0 2017-10-19 14:13 /user/ambari-qa
drwxr-xr-x   - druid     hdfs          0 2017-10-19 20:49 /user/druid
drwxr-xr-x   - hbase     hdfs          0 2017-10-19 13:43 /user/hbase
drwxr-xr-x   - hcat      hdfs          0 2017-10-19 13:53 /user/hcat
drwxr-xr-x   - hive      hdfs          0 2017-10-19 13:53 /user/hive
drwxrwxr-x   - oozie     hdfs          0 2017-10-19 13:57 /user/oozie
drwxr-xr-x   - zeppelin  hdfs          0 2017-10-19 19:25 /user/zeppelin &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Test whether path exists,the below returns 0 &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;$ hdfs dfs -test -e /user/druid&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Hope that helps&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 20:12:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hadoop-filesystem-Commands/m-p/204809#M71404</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2017-11-16T20:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Hadoop filesystem Commands</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hadoop-filesystem-Commands/m-p/204810#M71405</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/12437/balavigneshnagamuthuvenkatesan.html" nodeid="12437"&gt;@Bala Vignesh N V&lt;/A&gt;&lt;P&gt;this can help you: &lt;A href="https://hadoop.apache.org/docs/r2.7.3/hadoop-project-dist/hadoop-common/FileSystemShell.html#test" target="_blank"&gt;https://hadoop.apache.org/docs/r2.7.3/hadoop-project-dist/hadoop-common/FileSystemShell.html#test&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 20:15:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hadoop-filesystem-Commands/m-p/204810#M71405</guid>
      <dc:creator>dheer_vijji_rag</dc:creator>
      <dc:date>2017-11-16T20:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Hadoop filesystem Commands</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hadoop-filesystem-Commands/m-p/204811#M71406</link>
      <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/1271/sheltong.html" nodeid="1271"&gt;@Geoffrey Shelton Okot&lt;/A&gt;. This is what I'm looking for.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2017 21:13:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hadoop-filesystem-Commands/m-p/204811#M71406</guid>
      <dc:creator>balavignesh_nag</dc:creator>
      <dc:date>2017-11-16T21:13:23Z</dc:date>
    </item>
  </channel>
</rss>

