2010/8/12 Shell Xu <[email protected]>:
> python
> import os
> print sum([os.lstat(i)[6] for i in os.listdir('.')])
>

这个精巧,不过忘记递归子目录了!

回复