• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            我希望你是我獨(dú)家記憶

            一段永遠(yuǎn)封存的記憶,隨風(fēng)而去
            posts - 263, comments - 31, trackbacks - 0, articles - 3
               :: 首頁 :: 新隨筆 ::  :: 聚合  :: 管理

            python獲取文件夾大小(1)

            Posted on 2009-07-28 14:07 Hero 閱讀(2632) 評論(0)  編輯 收藏 引用 所屬分類: 資料整理
             1 #!/usr/bin/env python
             2 #
             3 #       getDirSize.py
             4 #       
             5 #       Copyright 2009 Hiro <wangzhaoren@gmail.com>
             6 #       
             7 #       This program is free software; you can redistribute it and/or modify
             8 #       it under the terms of the GNU General Public License as published by
             9 #       the Free Software Foundation; either version 2 of the License, or
            10 #       (at your option) any later version.
            11 #       
            12 #       This program is distributed in the hope that it will be useful,
            13 #       but WITHOUT ANY WARRANTY; without even the implied warranty of
            14 #       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
            15 #       GNU General Public License for more details.
            16 #       
            17 #       You should have received a copy of the GNU General Public License
            18 #       along with this program; if not, write to the Free Software
            19 #       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
            20 #       MA 02110-1301, USA.
            21 
            22 import os
            23 from os.path import join, getsize
            24 
            25 def getDirSize( dir ):
            26     size = 0L
            27     for root, dirs, files in os.walk(dir):
            28         size += sum( [getsize(join(root, name)) for name in files] )
            29     return size
            30 
            31 def main():
            32     
            33     filesize = getDirSize( "/home/wangzr" )
            34     print ( "there are %0.3f" %(filesize/1024/1024), "Mb in /home/wangzr" )
            35         
            36     return 0
            37 
            38 if __name__ == '__main__': main()
            39 

            国产精品xxxx国产喷水亚洲国产精品无码久久一区 | 国产精品久久久久免费a∨| 国产精品欧美久久久天天影视| 人妻无码αv中文字幕久久琪琪布| 国产精品欧美亚洲韩国日本久久| 精品久久久久久综合日本| 精品国产一区二区三区久久久狼| 久久这里只有精品18| 久久天天躁狠狠躁夜夜96流白浆 | 久久综合成人网| 一本久久综合亚洲鲁鲁五月天亚洲欧美一区二区| 青青青国产成人久久111网站| 色综合合久久天天综合绕视看| 青青青国产精品国产精品久久久久| 久久青青草原国产精品免费 | …久久精品99久久香蕉国产| 精品国际久久久久999波多野 | 岛国搬运www久久| 久久亚洲视频| 2020久久精品亚洲热综合一本| 亚洲国产精品无码久久久秋霞2| 久久亚洲AV成人无码电影| 国产精品99精品久久免费| 精品熟女少妇av免费久久| 97超级碰碰碰久久久久| 日本精品久久久久中文字幕8 | 久久精品国产99久久久| 国产精品久久久久久福利漫画| 国产一区二区三精品久久久无广告| 少妇久久久久久被弄到高潮| 欧美精品久久久久久久自慰| 亚洲午夜久久影院| 精品久久久无码21p发布| 久久99国产精品久久99| 一本久久精品一区二区| 久久99中文字幕久久| 欧美日韩精品久久久久| 久久国产精品99久久久久久老狼| 久久综合色老色| 国产亚洲精午夜久久久久久| 久久久噜噜噜久久中文福利|