Section 5:43. Understanding Size of the File System and Data Sets using df and du

The  hadoop fs -df -h  command in HDFS (Hadoop Distributed File System) is used to display the disk space used and disk space available in a human-readable format. The -df    option is used to show disk usage statistics and the  -h  option is used to display the output in a human-readable format (i.e., using units such as MB, GB, TB, etc.).

Here’s an example of the output of the  hadoop fs -df -h  command:

In this example, the HDFS file system has a total size of 16.5 TB, with 6.9 TB used and 8.7 TB available. The usage percentage is calculated as Used / (Used + Available) * 100, which is 42% in this case.

The  hadoop fs -du -h  command in HDFS (Hadoop Distributed File System) is used to display the disk space used by a particular directory or file in a human-readable format. The  -du  option stands for “disk usage” and is used to show the space used by a directory or file, and the  -h  option is used to display the output in a human-readable format (i.e., using units such as MB, GB, TB, etc.).

Here’s an example of the output of the  hadoop fs -du -h   command:

The   hadoop fs -du -s -h   command in HDFS (Hadoop Distributed File System) is used to display the disk space used by a particular directory in a summarized, human-readable format. The -du option stands for “disk usage” and is used to show the space used by a directory, the  -s  option is used to summarize disk usage by summing up the size of all files in the directory, and the -h option is used to display the output in a human-readable format (i.e., using units such as MB, GB, TB, etc.).

Share this post