Q&A
Ask and answer questions to make information more available to wider audiences.
Taylor Ken @kentaylor777   07, Jun 2023 12:00 AM
copy data from the local system
How do I copy data from the local system onto HDFS? 
answers 1
 
Answer 1
Jose Grimsbro @josegrimsbro   12, Jun 2023 07:38 PM
The following command will copy data from the local file system onto HDFS:

hadoop fs –copyFromLocal [source] [destination]

Example: hadoop fs –copyFromLocal /tmp/data.csv /user/test/data.csv

In the above syntax, the source is the local path and destination is the HDFS path. Copy from the local system using a -f option (flag option), which allows you to write the same file or a new file to HDFS.