Skip to content

Latest commit

 

History

History
148 lines (109 loc) · 3.77 KB

README.md

File metadata and controls

148 lines (109 loc) · 3.77 KB

Checksum-Utils ✅

Multiplatform file checksum tools


Go badge

Checksum Utils is a CLI tool to manage the checksum of your files, focused on NAS systems.

✨ Features

💻 Install

  1. Download the latest release from the releases page according to your operating system.

  2. Move and rename the downloaded executable to your PATH, so you can use it from anywhere.

    mv ./checksum-utils_linux-amd64 /usr/local/bin/checksum-utils
  3. Give it execute permissions if necessary:

    chmod 0755 /usr/local/bin/checksum-utils

🚀 Usage

Create checksum files

This command reads the files in a folder, gets their checksums, and creates a file with the .sha512 extension with it, so you can have a record of the checksum of that file.

Let's say you want to create the checksum files for your folder "documents":

├── ~
│   ├── documents
│   │   ├── document-1.pdf
│   │   ├── document-2.ppt
│   │   └── document-3.csv
│   ├── music
│   ├── pictures
│   └── videos

Use the command:

checksum-utils create ~/documents

This command will create a .sha512 checksum file for each file in your folder:

├── ~
│   ├── documents
│   │   ├── document-1.pdf
│   │   ├── document-1.pdf.sha512 <-- created by checksum-utils
│   │   │
│   │   ├── document-2.ppt
│   │   ├── document-2.ppt.sha512 <-- created by checksum-utils
│   │   │
│   │   ├── document-3.csv
│   │   └── document-3.csv.sha512 <-- created by checksum-utils
│   ├── music
│   ├── pictures
│   └── videos

Check checksum files

This command reads the content of the files generated by the command "checksum-utils create ~/documents" and compares them with the original file to verify if the checksum remains the same.

Let's say you want to check the checksums of the files of your folder "documents":

├── ~
│   ├── documents
│   │   ├── document-1.pdf
│   │   ├── document-1.pdf.sha512
│   │   │
│   │   ├── document-2.ppt
│   │   ├── document-2.ppt.sha512
│   │   │
│   │   ├── document-3.csv
│   │   └── document-3.csv.sha512
│   ├── music
│   ├── pictures
│   └── videos

Use the command:

checksum-utils check ~/documents

The command will display the results of the comparation of the current checksum of the file with the one stored in the file with the .sha512 extension:

├── ~
│   ├── documents
│   │   ├── document-1.pdf ✅
│   │   │
│   │   ├── document-2.ppt ✅
│   │   │
│   │   └── document-3.csv ❌
│   ├── music
│   ├── pictures
│   └── videos

🏗️ Dev

You must have golang installed on your system.

  1. Clone the project:

    git clone https://github.com/JMOrbegoso/checksum-utils.git
  2. Install Go dependencies:

    go mod download
  3. Build:

    make build

🧑‍💻 Author

JMOrbegoso: