https://github.com/magnetikonline/recursive-file-hash
Utility to recursively walk a given directory and generate a list of files alongside the filesize and SHA-1 hash.
https://github.com/magnetikonline/recursive-file-hash
hash python sha-1 utility
Last synced: about 1 month ago
JSON representation
Utility to recursively walk a given directory and generate a list of files alongside the filesize and SHA-1 hash.
- Host: GitHub
- URL: https://github.com/magnetikonline/recursive-file-hash
- Owner: magnetikonline
- License: mit
- Created: 2020-10-22T05:55:34.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-02-21T01:15:28.000Z (8 months ago)
- Last Synced: 2025-08-12T17:53:06.591Z (about 2 months ago)
- Topics: hash, python, sha-1, utility
- Language: Python
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Recursive file hash
Python utility to recursively walk a given directory and generate an ordered list of files alongside their filesize and SHA-1 hash.
- [Usage](#usage)
- [Example](#example)## Usage
```
usage: recursivefilehash.py [-h] [--progress] [--result-file RESULT_FILE]
scandirRecursively walk directory and generate ordered list of file path, filesize
and SHA-1 hash.positional arguments:
scandir source directory for scanningoptional arguments:
-h, --help show this help message and exit
--progress display activity during processing
--result-file RESULT_FILE
send results to file, rather than stdout
```## Example
Scan directory `/path/to/files`, displaying progress as processing and output results to `/tmp/my-results`:
```sh
$ ./recursivefilehash.py \
--progress \
--result-file /tmp/my-results \
-- /path/to/files$ cat /tmp/my-results
1a7c22b9611d57584a202d94bac1570cefd492d7 987758 /path/to/files/first
e182acd96094417cbd22399b09282ea5f2175a5e 1008844 /path/to/files/second
380ed0ce37a2bdf762201a023e244a29068f38d8 911319 /path/to/files/third
f1dc7800602667461c116447c2afcbfd0e451670 907618 /path/to/files/fourth
# and so on...
```