Name

strings

Synopsis

strings [options] files

Search each file specified and print any printable character strings found that are at least four characters long and followed by an unprintable character. Often used to find human-readable content within binary files.

Options

@file

Read command-line options as a whitespace-separated list of options from file.

-, -a, --all

Scan entire object files; default is to scan only the initialized and loaded sections for object files.

-e encoding, --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

I

16-bit little-endian

L

32-bit little-endian

s

Single-7-bit-byte characters, such as ASCII, ISO-8859, etc. (the default)

S

Single-8-bit-byte characters.

-f, --print-file-name

Print the name of the file before each string.

-min-len, -n min-len, --bytes=min-len

Print only strings that are at least min-len characters.

-o

The same as -t o.

-t base, --radix=base

Print the offset within the file before each string, in the format specified by base:

d

Decimal

o

Octal

x

Hexadecimal

-T format, --target=format

Specify an alternative object code format to the system default. See strings --help for a list of valid target formats.

--help

Print help message and then exit. The help message includes a list of valid targets.

-v, --version

Print version information and then exit.

Get Linux in a Nutshell, 6th 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.