Skip to content

Instantly share code, notes, and snippets.

@LuRsT
Created May 3, 2013 14:26
Show Gist options
  • Select an option

  • Save LuRsT/5509426 to your computer and use it in GitHub Desktop.

Select an option

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