#统计当前目录大小,并按大小排序
[[email protected]]# du -sh * | sort -hr
1.5G sky9896
647M skyboy
26M ultrax.txt
26M 20151104ultrax.txt
348K cacti_nginx.doc
20K zabbix
20K yshttp
20K ftpuser
16K lost+found
0 ultrax.sql
#按大小排序目录
[[email protected]]# du -h --time --max-depth=1 | sort -hr
2.2G 2017-09-07 14:14 .
1.5G 2017-06-17 20:53 ./sky9896
647M 2017-09-07 14:14 ./skyboy
20K 2017-03-28 10:07 ./yshttp
20K 2016-09-12 09:54 ./zabbix
20K 2015-09-26 14:24 ./ftpuser
16K 2014-11-04 22:51 ./lost+found
#统计home目录大小及第一层文件的大下并排序
[[email protected]/]# du -ah --max-depth=1 ./home | sort -hr
2.2G ./home
1.5G ./home/sky9896
647M ./home/skyboy
26M ./home/ultrax.txt
26M ./home/20151104ultrax.txt
348K ./home/cacti_nginx.doc
20K ./home/zabbix
20K ./home/yshttp
20K ./home/ftpuser
16K ./home/lost+found
0 ./home/ultrax.sql
#查看单个文件大小
[[email protected]]# du video –h
60M video
[[email protected]]# du html -sh
24G html