第一篇 linux安装hadoop集群(1)-准备工作

第二篇 linux安装hadoop集群(2)-配置安装

第三篇 linux安装hadoop集群(3)-运行Java程序

本篇 linux安装hadoop集群(4)-hdfs命令

1 监控界面

http://192.168.199.210:50070/explorer.html#/

linux安装hadoop集群(4)-hdfs命令

2 列出目录

[[email protected] sbin]# hdfs dfs -ls /
[[email protected] sbin]# hadoop fs -ls /

3 创建目录

[[email protected] sbin]# hadoop fs -mkdir /chy-data
[[email protected] sbin]# hdfs dfs  -mkdir /test

4 删除目录

[[email protected] sbin]# hdfs dfs -rmr /test

5 上传文件

[[email protected] sbin]# hdfs dfs -put /usr/chy/memo.cfg  /chy-data

6 查看文件

[[email protected] sbin]# hdfs dfs -cat /chy-data/memo.cfg

7 删除文件

[[email protected] sbin]# hdfs dfs -rm /chy-data/memo.cfg

8 下载文件

[[email protected] sbin]# hdfs dfs -get /chy-data/memo.cfg /usr/chy/temp

注意:
如果/usr/chy/存在temp文件,下提示错误
如果/usr/chy/temp目录不存在,下载文件名称是temp
否则存在/usr/chy/temp目录,则temp目录中生成文件memo.cfg

[[email protected] sbin]# hdfs dfs -get /chy-data/memo.cfg /usr/chy/m.txt
下载memo.cfg重新命名为m.txt

相关文章:

  • 2021-07-06
  • 2021-07-14
  • 2021-11-27
  • 2022-02-14
  • 2021-12-11
  • 2022-01-07
  • 2022-02-27
猜你喜欢
  • 2022-02-07
  • 2022-01-15
  • 2022-02-06
  • 2021-10-02
  • 2021-06-03
  • 2022-12-23
  • 2021-07-22
相关资源
相似解决方案