• <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) 評(píng)論(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| 久久精品午夜一区二区福利| 岛国搬运www久久| 久久综合精品国产一区二区三区| 久久久久亚洲AV无码去区首| 亚洲国产成人久久精品99 | 国产欧美一区二区久久| 国产69精品久久久久9999| 中文字幕乱码人妻无码久久| 青青草国产精品久久久久| 久久久精品久久久久久| 亚洲狠狠婷婷综合久久蜜芽| 国产精品女同一区二区久久| 久久久久av无码免费网| 国产成人久久精品二区三区| 伊人久久综合成人网| 91麻精品国产91久久久久| 乱亲女H秽乱长久久久| 久久夜色精品国产亚洲av| 国产国产成人精品久久| 97精品伊人久久久大香线蕉| 久久久久久噜噜精品免费直播| AV无码久久久久不卡蜜桃| 欧美亚洲国产精品久久高清| 久久亚洲2019中文字幕| 国产精品久久一区二区三区| 国产成人久久精品一区二区三区| 久久久精品无码专区不卡| 久久综合欧美成人| 99精品久久精品一区二区| 日产精品久久久久久久性色| 一97日本道伊人久久综合影院| 久久av免费天堂小草播放| 99久久精品免费观看国产| 久久久久久狠狠丁香| 久久精品男人影院| 97久久精品人人澡人人爽| 国产高清国内精品福利99久久| 国产精品亚洲综合专区片高清久久久| 欧美亚洲国产精品久久蜜芽| 久久亚洲精品中文字幕三区|