Skip to content

Instantly share code, notes, and snippets.

@kingychiu
Last active June 21, 2017 08:26
Show Gist options
  • Save kingychiu/8faf23a3e42e864ae9ebd4c1b5939924 to your computer and use it in GitHub Desktop.
Save kingychiu/8faf23a3e42e864ae9ebd4c1b5939924 to your computer and use it in GitHub Desktop.
Python script finding all files with file size which is multiple of 4096.
# Bug report: https://bugs.chromium.org/p/chromium/issues/detail?id=720597&can=2&start=0&num=100&q=&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified&groupby=&sort=
# Description: https://tinyio.wordpress.com/2017/06/17/solving-this-extension-may-have-been-corrupted-in-chrome-version-59/
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