File Checksum
Generate checksums for files.
CVM requires that submitted data files include a checksum to verify the file has not changed. This program will generate those checksums for either a single file, or all the files in a directory.
Installation
Installation with pipx is recommended.
pipx install file-checksum
Alternatively the program can be installed with pip.
pip install file-checksum
Usage
Generate
- Arguments
- checksum_path: Path to the directory or file for which to generate checksums [required]
- Options
- --output-file, -o: Path to the file to same the checksums. Must be a .txt file. If no path is provided the output will be printed to the screen and not saved. [default: None]
- --checksum-type, -c: The type of checksum to generate. Supported types are md5, sha1, and sha256. [default: sha256]
- --verbose: Provides more output while running
Example
If we have the files my_file_1.xml and my_file_2.xml in the home/my_files directory, checksums
can be generated for the files by running:
checksum /home/my_files -o /home/checksums.txt
The will create a file called checksums.txt in the /home directory containing the following
information (hashes made up for example purposes)
sha256 checksum: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - my_file_1.xml
sha256 checksum: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - my_file_2.xml
Subsequent runs pointing to the same output file will append the results to the file so checksums from different directores can be save to the same file.
Metadata
Release files for file-checksum 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| file_checksum-1.0.0.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| file_checksum-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.6 kB
Release files / file_checksum-1.0.0.tar.gz
| Download URL | file_checksum-1.0.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5fd3c61a1c01b59d3b94040f7a8b39d71d1fcf93348d12d4037615b4dd7907c6
|
|
BLAKE2b-256 checksum How to use checksums |
64cfec381f006733cb3b9313584dfee04c2fafad3da1390f9832bfc06feb9c83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.11.3 Linux/5.15.0-1035-azure
|
Release files / file_checksum-1.0.0-py3-none-any.whl
| Download URL | file_checksum-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ebc753e20737b58ac554fbd93f6ecf80f94259b91f7a2c334e083e187fb3e0fc
|
|
BLAKE2b-256 checksum How to use checksums |
58b3dae3cf4961941737462fff4b49afdbbbbe2c383966645df69493d9ec54f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.11.3 Linux/5.15.0-1035-azure
|