hadoop fs -get
时间: 2023-11-14 21:52:48 浏览: 81
The "hadoop fs -get" command is used to copy a file or directory from Hadoop Distributed File System (HDFS) to the local file system. The basic syntax of the command is as follows:
hadoop fs -get <source> <destination>
Here, "source" represents the path of the file or directory in HDFS, and "destination" represents the path of the local file system where the file or directory will be copied.
For example, to copy a file named "input.txt" from the HDFS directory "/user/hadoop/input" to the local directory "/home/hadoop/output", the command would be:
hadoop fs -get /user/hadoop/input/input.txt /home/hadoop/output
This command will copy the file "input.txt" from HDFS to the local directory "/home/hadoop/output". If the destination directory does not exist, it will be created automatically.
阅读全文