Forrest logo
back to the strings tool

strings:tldr:33239

strings: Prefix each result with its offset within the file in hexadecimal.
$ strings -t x ${filename}
try on your machine

The strings -t x ${filename} command is used to extract printable character sequences from a binary file (${filename}). Here is a breakdown of the individual components:

  • strings: This is a command-line utility in Unix-like operating systems that scans a file or input stream and extracts sequences of printable characters. It looks for ASCII strings in binary files and displays them on the standard output.

  • -t x: The -t option specifies the output format for the extracted strings. In this case, x is used, which represents hexadecimal values. It means that each extracted string will be displayed as a sequence of hexadecimal characters rather than the actual characters themselves.

  • ${filename}: This is a placeholder for the actual filename. You need to replace ${filename} with the name of the file you want to extract strings from. It can be an absolute or relative path to the file.

So, when you run the command strings -t x ${filename}, it will analyze the specified file and print out all the printable character sequences it finds, represented in hexadecimal format.

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 strings tool