sh
╔═╗ ╦ ╦ ╔═╗ ╔═╗ ╦╔═ ╔═╗ ╦ ╦ ╔═╗
║ ╠═╣ ║╣ ║ ╠╩╗ ╠╣ ║ ║ ║╣
╚═╝ ╩ ╩ ╚═╝ ╚═╝ ╩ ╩ ╚ ╩ ╩═╝ ╚═╝
A command line tool that logs the checksum and last 50 lines of each file in a folder written in rust
I use this to verify some backblaze log files and to see how things are changing that may cause unwanted safety freezes.
You can install this tool via the crates cargo ecosystem:
sh
λ cargo install checkfile
You can cd
into a folder and just run the tool with its defaults:
sh
λ cd path/to/folder
λ checkfile
The log for 11 files was written successfully to ./checkfile.log
Finished in 1.30ms
This will create a file called checkfile.log
that contains the name, checksum and last 50 lines of each file found in the current directory.
The format of the checkfile.log
is as follows:
```
--> contents of file [...] contents of file <--
--> contents of file [...] contents of file <--
--> contents of file [...] contents of file <-- ```
Type: <path>
Default value: .
Set the directory you would like to run checkfile
on.
sh
λ checkfile /path/to/folder
Type: <path>
Default value: ./checkfile.log
Set this output file name and path.
sh
λ checkfile -o /path/to/folder/yourfile.log
💡 Note: This will not create non-existing folder so the path has to exist
Type: <number>
Default value: 50
Set this amount of lines that should be included into the log file for each checked file.
sh
λ checkfile -l 10
Type: <bool>
Default value: false
Set to include dot files in your log.
sh
λ checkfile -d
💡 Note: If checkfiles encounters a binary file it will try to read it and mark lines it couldn't with [- binary data -]
Copyleft (c) 2023 Dominik Wilkowski. Licensed under the GNU GPL-3.0-or-later.