笨笨网美国主机,w ww.2 b p .n e t
#查看文件信息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 checknative -a
笨笨网美国主机,w ww.2 b p .n e t
提醒:《上传文件到hdfs的命令(hdfs上传下载命令)》最后刷新时间 2025-03-21 11:18:12,本站为公益型个人网站,仅供个人学习和记录信息,不进行任何商业性质的盈利。如果内容、图片资源失效或内容涉及侵权,请反馈至,我们会及时处理。本站只保证内容的可读性,无法保证真实性,《上传文件到hdfs的命令(hdfs上传下载命令)》该内容的真实性请自行鉴别。