1.0.4 • Published 5 years ago

file-checksum v1.0.4

Weekly downloads
236
License
MIT
Repository
github
Last release
5 years ago

File Checksum CLI

A CLI tool to calculate checksum of file's content using md5 or sha1 algorithms.

build-status npm-version dependencies downloads license

carbon

Installation

$ npm install -g file-checksum

Help and Version

$ file-checksum -v
1.0.4

$ file-checksum --help
Calculate checksum of a file.

Usage: file-checksum <filepath> [options]

Options:
  -v, --version                Print current CLI version.
  -a, --algorithm <algorithm>  Algorithm to be used for hashing (md5 or sha1) (default: "md5")
  -h, --help                   output usage information

Calculate Checksum

Once this package is installed globally, you can use file-checksum command.

$ file-checksum <filepath>
$ file-checksum <filepath> -a sha1
$ file-checksum <filepath> --algorithm sha1

If -a or --algorithm flag is missing, by default md5 algorithm is used.

Example

$ file-checksum test/file.txt

5e7c683623bdabaeae97f8157e80f85c

To create your own CLI tool using node.js, follow my article on Medium.