Forrest logo
tool overview
On this page you find all important commands for the CLI tool xxd. If the command you are looking for is missing please ask our AI.

xxd

xxd is a command line tool used in Unix and Unix-like operating systems to create a hex dump of a given file or standard input. It allows users to analyze the binary structure of files and examine their contents in hexadecimal or ASCII format. The tool is often used by programmers, system administrators, and forensic analysts.

  1. The primary purpose of xxd is to create a readable dump of a file's contents in hex format.
  2. It provides a straightforward and efficient way to examine the binary structure of files.
  3. By default, xxd outputs the offset, hex values, and ASCII representation of each byte.
  4. It can also be used to convert a hex dump back into a binary file.
  5. The tool supports numerous options to customize the output format, such as line width and byte grouping.
  6. xxd can perform binary file patching by editing the hex dump and then converting it back into a binary file.
  7. It is commonly used for reverse engineering, debugging, and analyzing binary protocols.
  8. The xxd command can be used on the command line, in shell scripts, or within other programs.
  9. It provides different output formats, including binary, octal, decimal, hexadecimal, and ASCII.
  10. xxd is a versatile utility that helps in understanding the internal structure of files and is widely used for various technical purposes.

List of commands for xxd:

  • xxd:tldr:02da9 xxd: Display the output in plain mode, without any gaps between the columns.
    $ xxd -p ${input_file}
    try on your machine
    explain this command
  • xxd:tldr:0607b xxd: Display the output with 10 columns of one octet (byte) each.
    $ xxd -c ${10} ${input_file}
    try on your machine
    explain this command
  • xxd:tldr:4a156 xxd: Display output only up to a length of 32 bytes.
    $ xxd -l ${32} ${input_file}
    try on your machine
    explain this command
  • xxd:tldr:adf32 xxd: Generate a hexdump from a binary file and save it as a text file.
    $ xxd ${input_file} ${output_file}
    try on your machine
    explain this command
  • xxd:tldr:c4c7b xxd: Revert a plaintext hexdump back into binary, and save it as a binary file.
    $ xxd -r -p ${input_file} ${output_file}
    try on your machine
    explain this command
  • xxd:tldr:c8482 xxd: Generate a hexdump from a binary file and display the output.
    $ xxd ${input_file}
    try on your machine
    explain this command
  • xxd:tldr:e6938 xxd: Display a more compact output, replacing consecutive zeros (if any) with a star.
    $ xxd -a ${input_file}
    try on your machine
    explain this command
tool overview