How to remove files from HDFS system

0 votes

Hi Guys,

I have uploaded files in HDFS. Now I want to remove these files from HDFS. How can I do that? 

Oct 1, 2020 in Big Data Hadoop by akhtar
• 38,260 points
25,614 views

1 answer to this question.

0 votes

Hi@akhtar,

You will find rm command in your Hadoop fs command. This command is similar to the Linux rm command, and it is used for removing a file from the HDFS file system. The command –rmr can be used to delete files recursively. You can see the syntax below.

$ hadoop fs -rm [-f] [-r|-R] [-skipTrash]
$ hadoop fs -rm -r /user/test/sample.txt
answered Oct 1, 2020 by MD
• 95,460 points

Related Questions In Big Data Hadoop

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,865 views
0 votes
1 answer

Hadoop HDFS: How to delete old files from HDFS?

You can use commands like this: hdfs dfs ...READ MORE

answered Nov 15, 2018 in Big Data Hadoop by Omkar
• 69,220 points
14,158 views
0 votes
1 answer

How to remove the directory from HDFS?

Hi@akhtar, You can remove the directory using the ...READ MORE

answered Oct 13, 2020 in Big Data Hadoop by MD
• 95,460 points
4,536 views
+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,984 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,490 points
2,215 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,490 points
2,482 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
11,057 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
2,559 views
0 votes
1 answer

How to copy files from HDFS to local system?

Hi@akhtar, You can use the put command in ...READ MORE

answered Oct 1, 2020 in Big Data Hadoop by MD
• 95,460 points
4,348 views
0 votes
1 answer

How to append files from local system to HDFS?

Hi@akhtar, You can use appendToFile in your Hadoop ...READ MORE

answered Oct 1, 2020 in Big Data Hadoop by MD
• 95,460 points
8,223 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