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

            久久国产精品-国产精品| 国产精品免费福利久久| 久久e热在这里只有国产中文精品99 | 久久香蕉国产线看观看99| a级毛片无码兔费真人久久| 综合久久精品色| 国产精品美女久久久久网| 日韩久久久久中文字幕人妻 | 精品久久久无码人妻中文字幕 | 国产日韩欧美久久| 久久精品日日躁夜夜躁欧美| 久久国产精品99久久久久久老狼 | 性做久久久久久久久久久| 91精品国产乱码久久久久久| 亚洲精品乱码久久久久久蜜桃| 天天躁日日躁狠狠久久| 亚洲欧美日韩精品久久亚洲区 | 热综合一本伊人久久精品| 国内精品人妻无码久久久影院| 色偷偷88欧美精品久久久| 日韩一区二区久久久久久| 久久天堂AV综合合色蜜桃网 | 日产久久强奸免费的看| 99久久夜色精品国产网站| 精品久久8x国产免费观看| 色婷婷综合久久久久中文一区二区| 久久久久国产一区二区三区| 青青热久久综合网伊人| 精品国产VA久久久久久久冰| 亚洲精品国产美女久久久| AV无码久久久久不卡蜜桃| 日产精品久久久久久久| 久久人妻无码中文字幕| 久久久这里有精品| 精品国产99久久久久久麻豆| 久久国产精品国语对白| 久久强奷乱码老熟女| 天天久久狠狠色综合| 2020最新久久久视精品爱 | 色综合久久88色综合天天 | 久久精品国产精品亚洲人人|