• <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 閱讀(2641) 評論(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 

            青青草原精品99久久精品66| 国产亚洲精品自在久久| 精品综合久久久久久88小说| 久久AAAA片一区二区| 久久亚洲国产精品成人AV秋霞| 久久亚洲AV成人无码国产| 观看 国产综合久久久久鬼色 欧美 亚洲 一区二区 | 国内精品人妻无码久久久影院导航 | 久久国产色AV免费观看| 国产午夜精品理论片久久 | 区久久AAA片69亚洲| 91超碰碰碰碰久久久久久综合| 国产香蕉久久精品综合网| 久久国产热精品波多野结衣AV| 国产巨作麻豆欧美亚洲综合久久| 久久久久人妻一区二区三区| 青青青国产精品国产精品久久久久 | 亚洲精品无码久久久| 久久久久久综合一区中文字幕| 亚洲乱码精品久久久久.. | 女人高潮久久久叫人喷水| 久久er国产精品免费观看8| 亚洲第一极品精品无码久久| 伊人久久大香线蕉无码麻豆| 久久99精品国产99久久6| 久久亚洲国产中v天仙www| 精品熟女少妇av免费久久| 久久久精品国产sm调教网站| 中文无码久久精品| 婷婷五月深深久久精品| 日韩欧美亚洲综合久久| 久久精品中文无码资源站| 国产精品久久久久久久人人看| 日韩电影久久久被窝网| 亚洲第一永久AV网站久久精品男人的天堂AV| 国产精品久久久福利| 99久久免费国产精品热| 996久久国产精品线观看| 伊人久久大香线焦综合四虎| 国产高清美女一级a毛片久久w| 久久99精品国产麻豆不卡|