Strings (Unix)


In computer software, strings is a program in Unix and Unix-like operating systems that finds and prints text strings embedded in binary files such as executables. It can be used on object files and core dumps.

Overview

Strings are recognized by looking for sequences of at least 4 printable characters terminating in a NUL character. Some implementations provide options for determining what is recognized as a printable character, which is useful for finding non-ASCII and wide character text.
Common usage includes piping its output to grep and fold or redirecting the output to a file.
It is part of the GNU Binary Utilities, and has been ported to other operating systems including Windows.

Example

Using strings to print sequences of characters that are at least 8 characters long :

dd if=/dev/mem bs=1k skip=768 count=256 2>/dev/null | strings -n 8 | less