New Contributor
Posts: 5
Registered: ‎02-04-2015

list hdfs directories is set to /u01/hadoop/dfs ..../u12/hadoop/dfs


I am assuming /u01/hadoop/dfs ..../u12/hadoop/dfs are hdfs filesystems.


When i query to list hdfs filesystems, i get the error...what am i missing and how can i list the hdfs directories under /u01../u12


[root@bda1node02 ~]#  hdfs dfs -ls /u01
ls: `/u01': No such file or directory
[root@bda1node02 ~]#






Cloudera Employee
Posts: 578
Registered: ‎01-20-2014

Re: list hdfs directories refers to directories on the datanode's local filesystem that
store HDFS blocks. The command "hdfs dfs" talks to the Namenode to query
HDFS for a directory /u01. These won't match up (even if identical
directory names do exist).

You can begin by running "hadoop fs -ls /" to get a listing of all top
level directories on HDFS

Gautam Gopalakrishnan