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 in Big Data Hadoop by akhtar
• 33,310 points
53 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 by MD
• 78,910 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,030 points
2,408 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,030 points
5,926 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 in Big Data Hadoop by MD
• 78,910 points
27 views
0 votes
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 19 in Big Data Hadoop by MD
• 78,910 points
92 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,450 points
669 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,450 points
754 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
• 10,950 points
6,340 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
• 10,950 points
979 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 in Big Data Hadoop by MD
• 78,910 points
48 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 in Big Data Hadoop by MD
• 78,910 points
38 views