设为首页 加入收藏

TOP

HDFS一     HDFS的shell操作
2019-02-19 12:30:45 】 浏览:62
Tags:HDFS   shell 操作
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u013792289/article/details/49785819
#hadoop fs -ls /  查看HDFS根目录
#hadoop fs -mkdir /test 在根目录创建一个目录test
#hadoop fs -mkdir /test1 在根目录创建一个目录test1
#echo -e 'hadoop second lesson' >test.txt
#hadoop fs -put ./test.txt /test 
或#hadoop fs -copyFromLocal ./test.txt /test
#cd ..
#hadoop fs -get /test/test.txt .
或#hadoop fs -getToLocal /test/test.txt
#hadoop fs -cp /test/test.txt /test1
#hadoop fs -rm /test1/test.txt
#hadoop fs -mv /test/test.txt /test1
#hadoop fs -rmr /test1   
#hadoop fs -appendToFile

-ls -R(递归显示) 文件夹名

-put 上传

例如把Linux上的RE.txt上传到根目录:bin/hdfs dfs -put RE.txt /

-get 获取

例如把RE.txt下载到本地:bin/hdfs dfs -get /RE.txt

-text 后面接文件名来查看文件

-appendToFile 追加

bin/hdfs dfs -appendToFile hello /hello

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Hadoop提交作业------>hadoop.. 下一篇Hadoop 2.7.2   linux分布..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目