Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Python script finding all files with file size which is multiple of 4096.
# Bug report:
# Description:
import os
import glob
size_dir = {}
for filename in glob.iglob('./**/*.*', recursive=True):
size =os.path.getsize(filename)
if size % 4096 == 0 and size != 0:
size_dir[filename] = os.path.getsize(filename)
for name, size in size_dir.items():
print(name, size)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment