Skip to content

Instantly share code, notes, and snippets.

@LuRsT
Created May 3, 2013 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LuRsT/5509426 to your computer and use it in GitHub Desktop.
Save LuRsT/5509426 to your computer and use it in GitHub Desktop.
Get files if their size is bellow 1K
import os
for dirpath, dirnames, filenames in os.walk('.'):
for f in filenames:
fp = os.path.join(dirpath, f)
size = os.path.getsize(fp)
if size < 1024:
print f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment