HDFS shell 常用命令

创建多级目录(-p):
hadoop fs -mkdir -p /test/a/b
 
展示目录:
hadoop fs -ls /
 
递归展示:
hadoop fs -ls -R /
 
从HDFS上下载文件到本地:
hadoop fs -get /test/a/b/h.txt
hadoop fs -copyToLocal  /test/a/b/h.txt
 
从本地上传文件到HDFS:
hadoop fs -copyFromLocal hello.txt /test/a/b/h.txt
hadoop fs -put hello.txt  /test/a/b/h.txt
posted @ 2023-08-16 17:36  咔咔皮卡丘  阅读(3)  评论(0编辑  收藏  举报