Skip to content

Cheatsheet

Aetherinox edited this page Feb 6, 2024 · 8 revisions

Cheatsheet

Version Downloads Repo Size Last Commit) Hits








General

Overall generic commands that preform various tasks


Help

Displas help, command list, and examples

xsum --help
xsum -h
xsum /?
xsum ?

List Ignored Files

Will display a list of default files ignored during hash digest generation.

xsum --ignores

List GPG Keys

Displays a list of all the GPG keys on your system.

xsum --list-keys

Diagnostics

Lists various diagnostic properties including:

  • Path to executable
  • Registered ignores
  • Registered algorithms
  • GPG status
xsum --diag



Generate

The following are a list of examples for generating a new hash digest. Some commands have multiple ways of executing them.


Current directory - default algorithm

Generate a hash digest in the current directory with the default algorithm SHA256

xsum --generate
xsum -g

Current directory - specific algorithm

Generate a hash digest in the current directory with a specific algorithm

xsum --generate --algo <ALGORITHM>
xsum -g -a <ALGORITHM>

Specific directory - default algorithm

Generate a hash digest in a specific directory elsewhere on your system using default algorithm SHA256

xsum --generate "X:\Path\To\Folder\Or\File"
xsum --generate --target "X:\Path\To\Folder\Or\File"
xsum -g -t "X:\Path\To\Folder\Or\File"

Specific directory - specific algorithm

Generate a hash digest in a specific directory with a specific algorithm

xsum --generate "X:\Path\To\Folder\Or\File" --algo <ALGORITHM>
xsum --generate --target "X:\Path\To\Folder\Or\File" --algo <ALGORITHM>
xsum -g -t "X:\Path\To\Folder\Or\File" -a <ALGORITHM>

Lowercase hashes instead of uppercase

Generate a hash digest and use lowercase characters instead of uppercase.

Setting Example
Default 1D3EF8698281E7CF7371D1554AFEF5872B39F96C26DA772210A33DA041BA1183
Lowercase 1d3ef8698281e7cf7371d1554afef5872b39f96c26da772210a33da041ba1183

xsum --generate "X:\Path\To\Folder\Or\File" --algo <ALGORITHM> --lowercase
xsum -g "X:\Path\To\Folder\Or\File" -a <ALGORITHM> -l

Show progress during generation

Generate a hash digest and displays each step of the process in your console.

xsum --generate "X:\Path\To\Folder\Or\File" --algo <ALGORITHM> --progress
xsum -g "X:\Path\To\Folder\Or\File" -a <ALGORITHM> -p

Clear console before generating

Generate a hash digest but wipe the console clear before it begins

xsum --generate "X:\Path\To\Folder\Or\File" --algo <ALGORITHM> --clear
xsum -g "X:\Path\To\Folder\Or\File" -a <ALGORITHM> -cl

Exclude specific file from generated hash digest

Generate a hash digest but ignore a certain file which will not be included in the digest's list of files. The following command will exclude the file myfile.txt and ANY file which ends with .dll.

xsum --generate "X:\Path\To\Folder\Or\File" --algo <ALGORITHM> --exclude myfile.txt --exclude *.dll
xsum -g "X:\Path\To\Folder\Or\File" -a <ALGORITHM> -e myfile.txt -e *.dll

Log progress to file (append)

Generate a hash digest and log each step to a specified log file. If the log file does not exist, it will be created. If the file already exists, the new log entries will be added to the bottom of the existing log file.

xsum --generate "X:\Path\To\Folder\Or\File" --algo <ALGORITHM> --output mylog.txt
xsum -g "X:\Path\To\Folder\Or\File" -a <ALGORITHM> -o mylog.txt

Log progress to file (overwrite)

Generate a hash digest and log each step to a specified log file. If the log file does not exist, it will be created. If the file already exists, everything in the log file will be deleted and a fresh log will be written to.

xsum --generate "X:\Path\To\Folder\Or\File" --algo <ALGORITHM> --output mylog.txt --overwrite
xsum -g "X:\Path\To\Folder\Or\File" -a <ALGORITHM> -o mylog.txt -w

Copy hash to clipboard

Generate a hash digest, if the target files are a folder or string, the generated hash will be copied to your Windows clipboard. If the target is a list of files, the "sum" of all the files will be turned into a single hash.

xsum --generate "X:\Path\To\Folder\Or\File" --algo <ALGORITHM> --clipboard
xsum -g "X:\Path\To\Folder\Or\File" -a <ALGORITHM> -c

Combo Example

Generate a hash digest. The example below shows how to structure a command using many of the commands available.

  • Generate hash
  • Use specific algorithm
  • Clear console before executing
  • Show progress
  • Log progress to file mylog.txt
    • Overwrite anything currently in log file
  • Copy resulting hash to clipboard
xsum --generate "X:\Path\To\Folder\Or\File" --algo <ALGORITHM> --clear --progress --output mylog.txt --overwrite --clipboard
xsum -g "X:\Path\To\Folder\Or\File" -a <ALGORITHM> -cl -p -o mylog.txt -w --c