用 hdfs dfs -ls /查看hdfs中的目录结果查出来是本地目录

在执行`hdfs dfs -ls /`时,由于/usr/bin目录下存在同名文件,导致实际上执行的是本地的hdfs而非HDFS集群命令,从而显示的是本地目录。解决方案是删除/usr/bin下的hdfs文件,以避免混淆。
摘要由CSDN通过智能技术生成

[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

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值