You can view the size of the files and directories in a specific directory with the du command. The command will show you the space (in bytes) used by the files that match the file pattern you specify. If it’s a file, you’ll get the length of the file. The syntax of the du command is as follows:
hdfs dfs -du -h /"path to specific hdfs directory"
Note the following about the output of the du –h command shown here:
The first column shows the actual size (raw size) of the files that users have placed in the various HDFS directories.
The second column shows the actual space consumed by those files in HDFS.
Hope this will answer your query to some extent.
For details, You can even check out Hadoop Ecosystem tools with the Hadoop big data course.