Check HDFS folder size in Shell / Hadoop

Hadoop provides a number of CLIs that can be used to perform many tasks/activities. This code snippet shows you how to check file/folder size in HDFS.

Raymond Tang Raymond Tang 0 2453 1.13 index 7/12/2019

Hadoop provides a number of CLIs that can be used to perform many tasks/activities. This code snippet shows you how to check file/folder size in HDFS.

hdfs dfs command can be used to check disk usage in HDFS.

Syntax:

hdfs dfs -du -h ${hdfs_path}

Code snippet

hdfs dfs -du -h /path/to/your/folder
hadoop shell

Join the Discussion

View or add your thoughts below

Comments