[root@node01 ~]# hdfs dfs -ls /
Warning: fs.defaultFS is not set when running "ls" command.
Found 26 items
-rw-r--r-- 1 root root 0 2019-05-08 16:46 /.autofsck
-rw-r--r-- 1 root root 0 2018-12-09 07:48 /.autorelabel
dr-xr-xr-x - root root 4096 2019-04-17 10:06 /bin
dr-xr-xr-x - root root 1024 2018-12-09 02:58 /boot
drwxr-xr-x - root root 4096 2017-03-22 16:42 /cgroup
drwxr-xr-x - root root 3820 2019-05-08 16:46 /dev
drwxr-xr-x - root root 12288 2019-05-08 16:46 /etc
drwxr-xr-x - root root 4096 2019-04-29 16:24 /export
drwxr-xr-x - root root 4096 2018-12-09 04:07 /home
dr-xr-xr-x - root root 4096 2019-04-16 22:28 /lib
dr-xr-xr-x - root root 12288 2019-04-25 16:33 /lib64
drwx------ - root root 16384 2018-09-12 05:20 /lost+found
drwxr-xr-x - root root 4096 2011-09-23 19:50 /me
用 hdfs dfs -ls /查看hdfs中的目录结果查出来是本地目录
最新推荐文章于 2024-07-10 18:39:39 发布
在执行`hdfs dfs -ls /`时,由于/usr/bin目录下存在同名文件,导致实际上执行的是本地的hdfs而非HDFS集群命令,从而显示的是本地目录。解决方案是删除/usr/bin下的hdfs文件,以避免混淆。
摘要由CSDN通过智能技术生成