//话不多说先上代码
hdfs dfs -get hdfs://host:port/user/hadoop/file localfile
其中hdfs://host:port/user/hadoop/file是指你的文件路径,localfile指你的本地路径
比如我在hdfs的/input目录下有一个名为test.txt文件,我现在想将它复制到我的桌面上(该虚拟机名为hadoop)
代码为:
hdfs dfs -get /input/test.txt /home/hadoop/Desktop
这样就实现了将指定文件复制到我的桌面上的操作
本文介绍了如何使用HDFS的`hdfs dfs-get`命令将存储在HDFS中的文件复制到本地桌面,例如从`/input/test.txt`复制到`home/hadoop/Desktop`。这个过程对于数据迁移和处理非常实用。
5818

被折叠的 条评论
为什么被折叠?



