Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

list hdfs directories

list hdfs directories

New Contributor 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 ~]#







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
Don't have an account?
Coming from Hortonworks? Activate your account here