Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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