Name

strings

Synopsis

    strings [options]files

Search object or binary files for sequences of four or more printable characters that end with a newline or null. See also od.

Common Options

-n, -nn, --bytes=n

Minimum string length is n (default is 4).

-, -a, --all

Search entire file, not just the initialized data portion of object files.

-o

Display the string’s offset position before the string. Solaris and Mac OS X: same as -t d. GNU/Linux: same as -t o.

-tformat, --radix=format

Specify how to print string offsets. format is one of d, o, or x for decimal, octal, or hexadecimal, respectively.

GNU/Linux Options

-eencoding, --encoding=encoding

Specify the character encoding of the strings to be found. Possible values are:

b

16-bit big-endian

B

32-bit big-endian

l

16-bit little-endian

L

32-bit little-endian

s

Single-byte character, such as ASCII, ISO-8859, etc. (the default)

--target= format

Specify an alternative object code format to the system default. Any valid BFD target name may be used for format.

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.