Created
April 9, 2018 18:03
-
-
Save bergpb/a015bd82bd8cf0b44b092f05b6486999 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
#check if sys.argv is set: | |
if len(sys.argv) > 1: | |
dir = sys.argv[1] | |
else: | |
dir = os.getcwd() | |
#go to dir | |
os.chdir(dir) | |
#for in all folders | |
for folder in os.listdir(dir): | |
os.system('du -msh %s' % folder) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment