常用HADOOP命令

xiaoxiao2021-02-28  8

1、格式化

hadoop namenode -format

2、放置文件 put ==copyFromLocal

  hadoop fs -put  //srcfile   /

hadoop dfs -put //hdfs   /

3、重命名

  hdfs dfs -mv ./aa.txt   ./bb.txt

4、下载 get == copyToLocal

hdfs dfs -get ./aa.txt ./bb.txt

5、 移动到hdfs

hdfs dfs -moveFromLocal hello.txt ./

6、 删除文件(或文件夹)

hdfs dfs -rm -r --

7、删除空文件夹

hdfs dfs -rmdir ...

8、在hdfs 上进行文件复制

hdfs dfs -cp /usr/xxx.txt /usr/aaa.txt

9、文件列表 

hdfs dfs -ls -R /

10、xsync xxx.xml

xcall cat /soft/..../xxx.xml

转载请注明原文地址: https://www.6miu.com/read-200263.html

最新回复(0)