The way to check a HDFS directory's size?

前端 未结 10 611
轻奢々
轻奢々 2021-01-30 12:14

I know du -sh in common Linux filesystems. But how to do that with HDFS?

10条回答
  •  再見小時候
    2021-01-30 12:57

    With this you will get size in GB

    hdfs dfs -du PATHTODIRECTORY | awk '/^[0-9]+/ { print int($1/(1024**3)) " [GB]\t" $2 }'
    

提交回复
热议问题