Is there any way to delete a directory from Hadoop cluster which is having comma(,) in its name?

0 votes

I have created a directory in hadoop that is having "," in its name like "SampleDir, Name". But, when I am trying to delete this Directory by using rmr hadoop shell command as following

hadoop dfs -rmr hdfs://host:port/User/SampleDir, Name
I'm getting the following error 

rmr: cannot remove hdfs://host:port/User/SampleDir: No such file or directory. rmr: cannot remove Name: No such file or directory.

But I didn't face any issues while deleting other directories from the same location, using the same command i.e.

hadoop dfs -rmr hdfs://host:port/dir_path
Can anyone tell me the way how to delete such kind of directories?

Thanks in advance!

May 7, 2018 in Big Data Hadoop by Shubham
• 13,290 points
255 views

1 answer to this question.

0 votes

Just try the following command:

hadoop fs -rm -r hdfs://host:port/User/SampleDir\,\ Name

I hope it will work.

answered May 7, 2018 by nitinrawat895
• 10,490 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Is there a way to rebalance single Datanode in Hadoop.

Currently Hadoop does not automatically do this. ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by kurt_cobain
• 9,240 points
57 views
0 votes
1 answer

Is there any way to access Hadoop web UI in linux?

In this case what you can do ...READ MORE

answered May 9, 2018 in Big Data Hadoop by nitinrawat895
• 10,490 points
613 views
0 votes
1 answer
0 votes
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,240 points
880 views
0 votes
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,490 points
2,303 views
0 votes
10 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
11,892 views
0 votes
1 answer
0 votes
1 answer

Is there any way to increase Java Heap size in Hadoop?

You can add some more memory by ...READ MORE

answered Apr 12, 2018 in Big Data Hadoop by nitinrawat895
• 10,490 points
835 views
0 votes
9 answers

Is there any way to check which Hadoop daemons are running?

use jps command, It will show all the running ...READ MORE

answered Dec 27, 2018 in Big Data Hadoop by Rakesh
• 160 points
6,250 views