Forrest logo
back to the hexdump tool

hexdump:tldr:6568e

hexdump: Display the input offset in hexadecimal and its ASCII representation in two columns.
$ hexdump -C ${filename}
try on your machine

The hexdump command is a utility in Unix-like operating systems used to display the hexadecimal and ASCII representation of a given file or input.

In the command hexdump -C ${filename}, the ${filename} is a placeholder for a variable that should be replaced with the actual name of a file you want to examine.

When you run this command in a terminal or command prompt, it will display the contents of the specified file in a format that includes both the hexadecimal values and their corresponding ASCII representation. The -C option is used to display the output in a canonical format with ASCII characters displayed on the right side.

For example, if you have a file called "example.txt" and you run the command hexdump -C example.txt, it will show you the hexadecimal and ASCII representation of the file's contents.

The output of the hexdump -C command typically looks something like this:

00000000  48 65 78 61 64 65 63 69  6d 61 6c 20 76 61 6c 75  |Hexadecimal valu|
00000010  65 73 20 69 6e 20 74 65  78 74 20 66 6f 72 6d 61  |es in text forma|
00000020  74 00 0a 5a 7a 79 78 20  69 73 20 61 77 65 73 6f  |t..Zzyx is aweso|
...

This output represents the file in both hexadecimal and ASCII. Each line starts with a memory address (in hexadecimal) followed by the corresponding hexadecimal values of the file contents and then the ASCII representation on the right.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the hexdump tool