HDFS DFS RM

Share

                    HDFS DFS RM

In Hadoop Distributed File System (HDFS), the dfs -rm command is used to delete files or directories from the HDFS file system. This command allows you to remove data stored in HDFS that you no longer need. Here’s how you can use the hadoop dfs -rm command:

bash
hadoop fs -rm [-r] <file_or_directory_path>
  • -r (optional): This flag is used to indicate that you want to delete a directory and its contents recursively. If you don’t use the -r flag, you can only delete individual files.
  • <file_or_directory_path>: This is the HDFS path of the file or directory you want to delete.

Here are some examples of using the hadoop fs -rm command:

  1. Delete a file:

    bash
    hadoop fs -rm /user/hadoop/input/myfile.txt
  2. Delete a directory and its contents recursively:

    bash
    hadoop fs -rm -r /user/hadoop/data/

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 *