|
发表于 2003-5-16 10:59:16
|
显示全部楼层
我有个现成的,你参考参考,适当的修改一下吧~- #! /bin/ksh
- #list all diretory's space
- #this is a example of du.
- for i in *
- do
- if [[ -d $i ]]
- then
- print "======================================="
- print "Space\tDirname\tUsers\tCreated date"
- print "$(du -sh $i)\t$(ls -ld $i|awk '{print $3," ",$6,"",$7,"",$8}')"
- print "======================================="
- fi
- done
复制代码 |
|