Linuxメモ : Rust製のhexylコマンドで色分け16進数表示
hexyl
hexylはRust製のコマンドラインHEX(16進数)viewer 。
下記パターンで色分け表示できる。
- NULL bytes
- printable ASCII characters
- ASCII whitespace characters
- other ASCII characters
- non-ASCII

インストール
各環境でのインストール方法はこのページに書いてある。
バイナリはこのページからダウンロードでき、 Rust製なのでcargo installでインストールできる。
$ cargo install hexyl
ヘルプメッセージ。
$ hexyl --help
hexyl 0.4.0
A command-line hex viewer
USAGE:
hexyl [file]
OPTIONS:
-n, --length <N> Read only N bytes from the input
--color <when> When to use colors. The auto-mode only displays colors if the output goes to an interactive terminal [default: always] [possible values: always,
auto, never]
-h, --help Prints help information
-V, --version Prints version information
ARGS:
<file> File to display
使い方
hexylの後にファイルを指定すればよい。

上記ファイルをheyxl, hexdumpした結果が下図。
