Back to the command reference

strings

FilesAdvanced In simulator In real Linux

Print the printable text in binary files

Name: strings

You can practise it right away in the simulator, and use it in real Linux mode too.

Description

strings finds runs of printable characters (at least 4 by default) in binary files and prints them. It is a quick way to see the text, version strings, paths or messages embedded in a program.

Syntax

strings [OPTION]... FILE...

Common options

-n / --bytes MINMinimum string length (default 4)
-a / --allScan the whole file (not only the data sections)
-t / --radix RADIXShow where each string is: o octal, d decimal, x hexadecimal
-f / --print-file-nameShow the file name before each string

Examples

  • $ strings /bin/ls | head

    Text embedded in a program

    Explain
  • $ strings app.bin | grep -i version

    Find a version string in a binary

    Explain

Related