上传文件到hdfs的命令_hdfs上传下载命令

上传文件到hdfs的命令_hdfs上传下载命令,第1张

上传文件到hdfs的命令_hdfs上传下载命令 查看#查看文件信息hdfs dfs -stat "%o %r" /mytest/1.txt上传#上传一个文件hdfs dfs -copyFromLocal /home/gc/1.txt /mytest/#上传本test.txt文件到HDFS根目录,HDFS根目录须无同名文件,否则“File exists”hdfs fs -put file:/root/test.txt hdfs:/#上传并重命名文件hdfs fs -put test.txt /test2.txt#一次上传多个文件到HDFS路径hdfs fs -put test1.txt test2.txt hdfs:/下载#下载到本地hdfs dfs -get /tmp/install.log /home/删除#删除文件 删除文件之后 文件被放入回收站trashhdfs dfs -rm -r –skipTrash /mytest/1.txt#跳过回收站hdfs dfs -rm -r –skipTrash /mytest/1.txt数量hdfs dfs -count /修改权限hdfs dfs -chmod 777 /1.txt统计目录各个文件大小hdfs dfs -du -h /balance/*/*.zip多线程导入导出文件hdfs com.citicbank.hdfs.CrossFileSystemCopyer –r –t 5 file:///home/ hdfs://todo注:src多个逗号隔开,拷贝成功 命令返回0 失败为1。

Hadoop Native库生效情况hadoop checknative -a

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/tougao/652590.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-17
下一篇 2022-04-17

发表评论

登录后才能评论

评论列表(0条)

保存