Support Questions
Find answers, ask questions, and share your expertise
Announcements
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

Highlighted

list hdfs directories

New Contributor

dfs.data.dir 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 ~]#

 

 

 

Thanks

 

1 REPLY 1

Re: list hdfs directories

dfs.data.dir 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

Regards,
Gautam Gopalakrishnan