.\" Automatically generated by Pandoc 3.5 .\" .TH "HEXYL" "1" "2022\-12\-05" "hexyl 0.12.0" "General Commands Manual" .SH NAME hexyl \- a command\-line hex viewer .SH SYNOPSIS \f[B]hexyl\f[R] [\f[I]OPTIONS\f[R]] [\f[I]FILE\f[R]] .SH DESCRIPTION \f[B]hexyl\f[R] is a simple hex viewer for the terminal. It uses a colored output to distinguish different categories of bytes (NULL bytes, printable ASCII characters, ASCII whitespace characters, other ASCII characters and non\-ASCII). .SH POSITIONAL ARGUMENTS .TP \f[I]FILE\f[R] The file to display. If no \f[I]FILE\f[R] argument is given, read from STDIN. .SH OPTIONS .TP \f[B]\-n\f[R], \f[B]\-\-length\f[R] \f[I]N\f[R] Only read \f[I]N\f[R] bytes from the input. The \f[I]N\f[R] argument can also include a unit with a decimal prefix (kB, MB, ..) or binary prefix (kiB, MiB, ..), or can be specified using a hex number. .RS .TP Examples: .TP Read the first 64 bytes: $ \f[B]hexyl \-\-length=64\f[R] .TP Read the first 4 kibibytes: $ \f[B]hexyl \-\-length=4KiB\f[R] .TP Read the first 255 bytes (specified using a hex number): $ \f[B]hexyl \-\-length=0xff\f[R] .RE .TP \f[B]\-c\f[R], \f[B]\-\-bytes\f[R] \f[I]N\f[R] An alias for \f[B]\-n\f[R]/\f[B]\-\-length\f[R]. .TP \f[B]\-l\f[R] \f[I]N\f[R] Yet another alias for \f[B]\-n\f[R]/\f[B]\-\-length\f[R]. .TP \f[B]\-s\f[R], \f[B]\-\-skip\f[R] \f[I]N\f[R] Skip the first \f[I]N\f[R] bytes of the input. The \f[I]N\f[R] argument can also include a unit (see \f[B]\-\-length\f[R] for details). A negative value is valid and will seek from the end of the file. .TP \f[B]\-\-block\-size\f[R] \f[I]SIZE\f[R] Sets the size of the block unit to \f[I]SIZE\f[R] (default is 512). .RS .TP Examples: .TP Sets the block size to 1024 bytes: $ \f[B]hexyl \-\-block\-size=1024 \-\-length=5block\f[R] .TP Sets the block size to 4 kilobytes: $ \f[B]hexyl \-\-block\-size=4kB \-\-length=2block\f[R] .RE .TP \f[B]\-v\f[R], \f[B]\-\-no\-squeezing\f[R] Displays all input data. Otherwise any number of groups of output lines which would be identical to the preceding group of lines, are replaced with a line comprised of a single asterisk. .TP \f[B]\-\-color\f[R] \f[I]WHEN\f[R] When to use colors. The auto\-mode only displays colors if the output goes to an interactive terminal. .RS .TP Possible values: .IP \[bu] 2 \f[B]always\f[R] (default) .IP \[bu] 2 \f[B]auto\f[R] .IP \[bu] 2 \f[B]never\f[R] .RE .TP \f[B]\-\-border\f[R] \f[I]STYLE\f[R] Whether to draw a border with Unicode characters, ASCII characters, or none at all. .RS .TP Possible values: .IP \[bu] 2 \f[B]unicode\f[R] (default) .IP \[bu] 2 \f[B]ascii\f[R] .IP \[bu] 2 \f[B]none\f[R] .RE .TP \f[B]\-o\f[R], \f[B]\-\-display\-offset\f[R] \f[I]N\f[R] Add \f[I]N\f[R] bytes to the displayed file position. The \f[I]N\f[R] argument can also include a unit (see \f[B]\-\-length\f[R] for details). A negative value is valid and calculates an offset relative to the end of the file. .TP \f[B]\-h\f[R], \f[B]\-\-help\f[R] Prints help information. .TP \f[B]\-V\f[R], \f[B]\-\-version\f[R] Prints version information. .SH ENVIRONMENT VARIABLES .TP \f[B]hexyl\f[R] colors can be configured via environment variables. The variables used are as follows: .IP \[bu] 2 \f[B]HEXYL_COLOR_ASCII_PRINTABLE\f[R]: Any non\-whitespace printable ASCII character .IP \[bu] 2 \f[B]HEXYL_COLOR_ASCII_WHITESPACE\f[R]: Whitespace such as space or newline (only visible in middle panel with byte values) .IP \[bu] 2 \f[B]HEXYL_COLOR_ASCII_OTHER\f[R]: Any other ASCII character (< \f[B]0x80\f[R]) besides null .IP \[bu] 2 \f[B]HEXYL_COLOR_NULL\f[R]: The null byte (\f[B]0x00\f[R]) .IP \[bu] 2 \f[B]HEXYL_COLOR_NONASCII\f[R]: Any non\-ASCII byte (> \f[B]0x7F\f[R]) .IP \[bu] 2 \f[B]HEXYL_COLOR_OFFSET\f[R]: The lefthand file offset .PP The colors can be any of the 8 standard terminal colors: \f[B]black\f[R], \f[B]blue\f[R], \f[B]cyan\f[R], \f[B]green\f[R], \f[B]magenta\f[R], \f[B]red\f[R], \f[B]yellow\f[R] and \f[B]white\f[R]. The \[lq]bright\[rq] variants are also supported (e.g., \f[B]bright blue\f[R]). Additionally, you can use the RGB hex format, \f[B]#abcdef\f[R]. For example, \f[B]HEXYL_COLOR_ASCII_PRINTABLE=blue HEXYL_COLOR_ASCII_WHITESPACE=\[lq]bright green\[rq] HEXYL_COLOR_ASCII_OTHER=\[lq]#ff7f99\[rq]\f[R]. .SH NOTES .TP Source repository: \c .UR https://github.com/sharkdp/hexyl .UE \c .SH EXAMPLES .TP Print a given file: $ \f[B]hexyl small.png\f[R] .TP Print and view a given file in the terminal pager: $ \f[B]hexyl big.png | less \-r\f[R] .TP Print the first 256 bytes of a given special file: $ \f[B]hexyl \-n 256 /dev/urandom\f[R] .SH AUTHORS \f[B]hexyl\f[R] was written by David Peter \c .MT mail@david-peter.de .ME \c \&. .SH REPORTING BUGS .TP Bugs can be reported on GitHub at: \c .UR https://github.com/sharkdp/hexyl/issues .UE \c .SH COPYRIGHT .TP \f[B]hexyl\f[R] is dual\-licensed under: .IP \[bu] 2 Apache License 2.0 (\c .UR https://www.apache.org/licenses/LICENSE-2.0 .UE \c ) .IP \[bu] 2 MIT License (\c .UR https://opensource.org/licenses/MIT .UE \c ) .SH SEE ALSO \f[B]hexdump\f[R](1), \f[B]xxd\f[R](1)