Duplicate Finder Script: Revision history

From Federal Burro of Information
Jump to navigationJump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

9 June 2023

  • curprev 23:5823:58, 9 June 2023David talk contribs 1,229 bytes +18 No edit summary
  • curprev 23:5823:58, 9 June 2023David talk contribs 1,211 bytes +1,211 Created page with " finder.py <pre> #!/usr/bin/env python3 import os import hashlib def get_file_checksum(filename): """ Returns the SHA-256 hash of the contents of a file """ sha256 = hashlib.sha256() with open(filename, 'rb') as f: while True: data = f.read(1024) if not data: print("x", end = '') break sha256.update(data) print("!", end = '') return sha256.hexdigest() def fi..."