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

            久久高清一级毛片| 国产成人久久久精品二区三区 | av无码久久久久久不卡网站| 久久婷婷成人综合色综合| 久久精品国产亚洲AV嫖农村妇女 | 久久91精品国产91久| 国产精品乱码久久久久久软件| 人妻无码αv中文字幕久久| 26uuu久久五月天| 久久综合狠狠综合久久97色| 亚洲午夜无码久久久久| 精品久久久久久久中文字幕| 欧美黑人又粗又大久久久| 久久久噜噜噜久久| 国产精品久久久久jk制服| 久久只这里是精品66| 青青青青久久精品国产 | 亚洲精品午夜国产VA久久成人| 91秦先生久久久久久久| 无码人妻精品一区二区三区久久久 | 久久婷婷色综合一区二区| 精品无码久久久久久尤物| 性做久久久久久久久浪潮| 日本免费久久久久久久网站| 久久天天躁狠狠躁夜夜网站| 亚洲精品WWW久久久久久| 91精品国产91久久久久久| 久久国产高潮流白浆免费观看| 97精品伊人久久大香线蕉| 亚洲国产一成久久精品国产成人综合| 久久精品国产亚洲网站| 久久96国产精品久久久| 精品久久久久久无码中文字幕一区| 国产69精品久久久久观看软件| 精品久久综合1区2区3区激情| 久久福利青草精品资源站免费| 亚洲日韩中文无码久久| 熟妇人妻久久中文字幕| 久久亚洲中文字幕精品有坂深雪| 久久亚洲精品成人无码网站| 伊人久久大香线蕉无码麻豆|