HDFS du

Share

                             HDFS du

In Hadoop, the hdfs du command is used to display the disk usage of directories and files within the Hadoop Distributed File System (HDFS). It shows the amount of storage space occupied by the specified paths in HDFS. Here’s how you can use the hdfs du command:

Syntax:

css
hdfs du [-s] [-h] <path>
  • -s (optional): If you include the -s option, the command will display a summary of the total disk usage of the specified path, rather than listing the usage for individual subdirectories and files within that path.

  • -h (optional): If you include the -h option, the command will display the sizes in a human-readable format (e.g., KB, MB, GB) rather than in bytes.

  • <path>: This is the HDFS path for which you want to check the disk usage.

Examples:

  1. To display the disk usage of a specific directory in HDFS, you can use the following command:

    bash
    hdfs du /user/yourusername/some_directory

    This will list the sizes of all subdirectories and files within the /user/yourusername/some_directory in HDFS.

  2. To get a summary of the total disk usage for a directory and its subdirectories, you can use the -s option:

    bash
    hdfs du -s /user/yourusername/some_directory

    This will provide a single total size for the specified directory and all its contents.

  3. To display the disk usage in a human-readable format, you can combine the -h option with the previous commands:

    bash
    hdfs du -sh /user/yourusername/some_directory

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 *