HDFS DFS Rmdir

Share

                    HDFS DFS Rmdir

In Hadoop HDFS, the hdfs dfs -rm -r command is used to delete a directory and its contents recursively. The -r option stands for recursive, which means it will delete all files and subdirectories within the specified directory.

Here’s the basic syntax for using the hdfs dfs -rm -r command to delete a directory in HDFS:

bash
hdfs dfs -rm -r /path/to/directory
  • hdfs dfs: This is the command to interact with HDFS.
  • -rm -r: These are the options to indicate that you want to remove a directory and its contents recursively.
  • /path/to/directory: Replace this with the actual HDFS path to the directory you want to delete.

For example, if you want to delete a directory named “mydata” located in the root of HDFS, you would use the following command:

bash
hdfs dfs -rm -r /mydata

Please be cautious when using this command, as it will permanently delete the specified directory and its contents from HDFS, and there is no easy way to recover deleted data in HDFS.

 

Hadoop Training Demo Day 1 Video:

 
You can find more information about Hadoop Training in this Hadoop Docs Link

 

Conclusion:

Unogeeks is the No.1 IT Training Institute for Hadoop Training. Anyone Disagree? Please drop in a comment

You can check out our other latest blogs on Hadoop Training here – Hadoop Blogs

Please check out our Best In Class Hadoop Training Details here – Hadoop Training

💬 Follow & Connect with us:

———————————-

For Training inquiries:

Call/Whatsapp: +91 73960 33555

Mail us at: info@unogeeks.com

Our Website ➜ https://unogeeks.com

Follow us:

Instagram: https://www.instagram.com/unogeeks

Facebook:https://www.facebook.com/UnogeeksSoftwareTrainingInstitute

Twitter: https://twitter.com/unogeeks


Share

Leave a Reply

Your email address will not be published. Required fields are marked *