Copy files in different folders in Hadoop

0 votes

Hi Guys,

I have some files in a directory in Hadoop. I want to copy files from one directory to another directory. How can I do that?

Oct 1, 2020 in Big Data Hadoop by akhtar
• 38,170 points
74 views

1 answer to this question.

0 votes

Hi@akhtar,

You can use the cp command in Hadoop. This command is similar to the Linux cp command, and it is used for copying files from one directory to another directory within the HDFS file system. You can see the below example.

$ hadoop fs -cp /user/data/sample1.txt /user/hadoop1
answered Oct 1, 2020 by MD
• 95,180 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Different ports in a Hadoop cluster environment?

Below image will help you in understanding ...READ MORE

answered Apr 6, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
496 views
0 votes
1 answer

What are SUCCESS and part-r-00000 files in Hadoop?

Yes, both the files i.e. SUCCESS and ...READ MORE

answered Apr 12, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
7,295 views
0 votes
1 answer

Files for Configuring HDFS in Hadoop 2.2.0?

By default these Hadoop configuration files are ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by Shubham
• 13,480 points
126 views
0 votes
1 answer

Moving files in Hadoop using the Java API?

I would recommend you to use FileSystem.rename(). ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by Shubham
• 13,480 points
1,708 views
0 votes
1 answer

What is the command to find the free space in HDFS?

You can use dfsadmin which runs a ...READ MORE

answered Apr 29, 2018 in Big Data Hadoop by Shubham
• 13,480 points
849 views
0 votes
1 answer

How to find the used cache in HDFS

hdfs dfsadmin -report This command tells fs ...READ MORE

answered May 4, 2018 in Big Data Hadoop by Shubham
• 13,480 points
940 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
7,227 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
1,175 views
0 votes
1 answer

I have to ingest in hadoop cluster large number of files for testing , what is the best way to do it?

Hi@sonali, It depends on what kind of testing ...READ MORE

answered Jul 7, 2020 in Big Data Hadoop by MD
• 95,180 points
316 views
0 votes
1 answer

How to upload files in Hadoop Cluster?

Hi@akhtar, To upload a file in Hadoop Cluster, ...READ MORE

answered Sep 25, 2020 in Big Data Hadoop by MD
• 95,180 points
377 views