[root@localhost test]# du|sort -nr|more 1288 . 608 ./test6 308 ./test4 32 ./scf 16 ./scf/service 12 ./scf/service/deploy 8 ./test3 4 ./scf/service/deploy/product 4 ./scf/service/deploy/info 4 ./scf/lib 4 ./scf/doc 4 ./scf/bin [root@localhost test]#
实例10:输出当前目录下各个子目录所使用的空间
命令:
du -h --max-depth=1
输出:
[root@localhost test]# du -h --max-depth=1 608K ./test6 308K ./test4 32K ./scf 8.0K ./test3 1.3M . [root@localhost test]#