Display file contents in hexadecimal
hexdump -b {one-byte-octal} -X {one-byte-hex} -c {one-byte-char} -C {canonical} -d {two-bytes-decimal} ๐ one-byte-octal ๐ one-byte-hex ๐ one-byte-char ๐ canonical ๐ two-bytes-decimal hexdump -b {one-byte-octal} -X {one-byte-hex} -c {one-byte-char} -C {canonical} -d {two-bytes-decimal} Sandbox: execFile · Timeout: 30s
system.file.hexdump system.file.search system.file.process system.file.copy system.file.move system.file.delete | Name | Type | Required | Default | Description | Aliases |
|---|---|---|---|---|---|
one-byte-octal | string | No | - | one-byte octal display | -b, --one-byte-octal |
one-byte-hex | string | No | - | one-byte hexadecimal display | -X, --one-byte-hex |
one-byte-char | string | No | - | one-byte character display | -c, --one-byte-char |
canonical | string | No | - | canonical hex+ASCII display | -C, --canonical |
two-bytes-decimal | string | No | - | two-byte decimal display | -d, --two-bytes-decimal |
two-bytes-octal | string | No | - | two-byte octal display | -o, --two-bytes-octal |
two-bytes-hex | string | No | - | two-byte hexadecimal display | -x, --two-bytes-hex |
color | string | No | - | interpret color formatting specifiers | -L, --color |
format | string | No | - | format string to be used for displaying data | -e, --format <format> |
format-file | file | No | - | Set the format-file parameter | -f, --format-file <file> |
length | string | No | - | interpret only length bytes of input | -n, --length <length> |
skip | string | No | - | skip offset bytes from the beginning | -s, --skip <offset> |
no-squeezing | string | No | - | output identical lines | -v, --no-squeezing |
help | string | No | - | display this help | -h, --help |
version | string | No | - | display version | -V, --version |
Basic usage with one-byte-octal
hexdump ${one-byte-octal} Display help message
hexdump --help side-by-side hexadecimal and ASCII view of the first 128 bytes of a file
hexdump -C -n128 /etc/passwd Convert a binary file to C Array
hexdump -v -e '16/1 "0x%02X, "' -e '"\n"' file.bin > hexarray.h Convert a binary file to Shell code
hexdump -v -e '"\\""x" 1/1 "%02x" ""' Generate random MAC address
hexdump -n6 -e '/1 ":%02X"' /dev/random|sed s/^://g hexdump is a command-line utility for display file contents in hexadecimal.
hexdump -b {one-byte-octal} -X {one-byte-hex} -c {one-byte-char} -C {canonical} -d {two-bytes-decimal}