hadoop copy a local file system folder to HDFS

0 votes

I have a directory present in my local filesystem. That directory is containing multiple directories. I have to copy the whole directory to HDFS.

I am not able to find any command for doing so? Will this command work?

$hadopp fs -copyFromLocal /local-filesystem-directory /HDFS-path
Apr 19, 2018 in Big Data Hadoop by coldcode
• 2,090 points
25,237 views

2 answers to this question.

0 votes

You can use both

hdfs dfs -put /local-filesystem-directory /HDFS-path

or 

hdfs dfs -copyFromLocal /local-filesystem-directory /HDFS-path

They write the data recursively to the HDFS. Hope this helps.

answered Apr 19, 2018 by Shubham
• 13,490 points
0 votes

There's a typo in your command: "hadopp". If you run the command mentioned in your question, you will end up getting an error telling that the command was not found. You can use the following command:

$ hadoop fs -copyFromLocal /local-filesystem-directory /HDFS-path
answered Feb 4, 2019 by Lohith
Oh Damn! Silly typo. Thanks

Related Questions In Big Data Hadoop

0 votes
1 answer

Copy file from HDFS to the local file system

There are two possible ways to copy ...READ MORE

answered Mar 27, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
17,047 views
0 votes
1 answer

Hadoop: How to copy directory from local system to hdfs using Java code?

Just use the FileSystem's copyFromLocalFile method. If the source Path ...READ MORE

answered Nov 14, 2018 in Big Data Hadoop by Omkar
• 69,220 points
5,808 views
0 votes
0 answers
+1 vote
1 answer

How to copy file from Local file system to HDFS?

Hi@akhtar, You can copy files from your local ...READ MORE

answered Oct 20, 2020 in Big Data Hadoop by MD
• 95,460 points
2,907 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
10,979 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
108,548 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,390 points
4,586 views
0 votes
1 answer
0 votes
1 answer

How to print the content of a file in console present in HDFS?

Yes, you can use hdfs dfs command ...READ MORE

answered Apr 19, 2018 in Big Data Hadoop by Shubham
• 13,490 points
5,787 views
0 votes
1 answer

Where does HDFS stores data on the local file system?

First find the Hadoop directory present in ...READ MORE

answered May 8, 2018 in Big Data Hadoop by Shubham
• 13,490 points
16,549 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP