现在的位置: 首页 > 综合 > 正文

hdfs命令操作

2018年11月03日 ⁄ 综合 ⁄ 共 380字 ⁄ 字号 评论关闭

转载自:http://www.dreamflier.net/blog/user1/3/2405.html

 

查看

hadoop fs

 

建目录

hadoop fs -mkdir /user/cloud/test

 

列当前目录

hadoop fs -ls

 

列根目录

hadoop fs -ls /

 

循环列目录

hadoop fs -lsr /

 

上传到当前目录

sudo nano example.txthadoop fs -put example.txt

 

下载

hadoop fs -get example.txt

 

显示文件内容

hadoop fs -cat example.txt

 

快速检查内容

hadoop fs -cat example.txt | head

 

查看最后1千字符

hadoop fs -tail example.txt

 

删除文件或空目录

hadoop fs -rm example.txt

 

查看指定命令帮助

hadoop fs -help rmr

抱歉!评论已关闭.