The way to check a HDFS directory's size?

前端 未结 10 860
轻奢々
轻奢々 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:55

    hdfs dfs -count

    info from man page:

    -count [-q] [-h] [-v] [-t []] [-u]  ... :
      Count the number of directories, files and bytes under the paths
      that match the specified file pattern.  The output columns are:
      DIR_COUNT FILE_COUNT CONTENT_SIZE PATHNAME
      or, with the -q option:
      QUOTA REM_QUOTA SPACE_QUOTA REM_SPACE_QUOTA
            DIR_COUNT FILE_COUNT CONTENT_SIZE PATHNAME
    

提交回复
热议问题