hadoop fs -du /user/hive/warehouse/ods.db/ | tail -n +2 | sort -r -n | awk '{size=$1/1024;if(size<1024){printf("%10.3f KB\t%s\n",size,$2);}else{size=size/1024;if(size<1024){printf("\033[36m%10.3f MB\t%s\n\033[0m",size,$2);}else{size=size/1024;if(size<1024){printf("\033[35m%10.3f GB\t%s\n\033[0m",size,$2);}else{size=size/1024;printf("\033[31m%10.3f TB\t%s\n\033[0m",size,$2);}}}}'
查看hdfs目录下每个目录大小
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
HIVE获取大于当天的时间戳
SELECT unix_timestamp(from_unixtime(unix_timestamp(),'yyyy-MM-dd 00:00:00')); 獲取當天0點開始的時間戳
ccagy
2020-07-07 18:04:23
kettle连接hive2 HDP2.6
ccagy
2020-07-07 18:04:23
hadoop扩容与下线
难得糊涂_不解释
2020-07-07 12:06:22
Common issues of disk going full on EMR Cluster (or In general any Hadoop / Spark cluster)
玉羽凌风
2020-07-06 11:05:42
HDFS中将普通用户加入到supergroup组来访问HDFS
玉羽凌风
2020-07-06 11:05:42
org.apache.hadoop.security.AccessControlException: Permission denied: user=root
玉羽凌风
2020-07-06 11:05:42
新建hadoop用户并给予sudo权限
玉羽凌风
2020-07-06 11:05:42
HADOOP+ZOOKEEPER+HBASE测试搭建
whb234174124
2020-07-05 06:48:36
hbase异常记录
kelong_xhu
2020-07-04 23:21:28
(转)hive sql 学习笔记
kelong_xhu
2020-07-04 23:21:28
hive安装及使用
kelong_xhu
2020-07-04 23:21:18
Flume多个agent到colletor
kelong_xhu
2020-07-04 23:21:18
LINUX中报错 -bash:ls:command not found
二进制的蛇
2020-07-04 00:03:02
MySQL数据库热备份
二进制的蛇
2020-07-04 00:02:52