统计目录下各个子目录占用的空间
hadoop fs -du -h viewfs://ClusterXG/user/lang_bi/warehouse/langbi_dm.db
按占用空间大小倒序排列
hadoop fs -du viewfs://ClusterXG/user/lang_bi/warehouse/langbi_dm.db | sort -k1 -rn
按文件数量倒序排列
hadoop fs -count viewfs://ClusterXG/user/lang_bi/warehouse/langbi_dm.db/* | sort -k 2 -rn
删除目录
hadoop fs -rm -r viewfs://ClusterXG/user/lang_bi/warehouse/langbi_dm.db/xiaoxihao_dwd/year=2017/month=03
hadoop fs -rm -r viewfs://ClusterXG/user/lang_bi/warehouse/langbi_dm.db/user_app/dt=201612*
|