Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

User Commands (s) strings(1)
NAME
strings - Finds printable strings in binary les
SYNOPSIS
strings [-a][-t format][-n number][le ...]
FLAGS
-a Searches an entire object le, linkle, or loadle rather than just the:
Code, data, and extended data areas of a TNS or accelerated object le
.data, .rodata, and .sdata areas of a TNS/R native non-position-
independent (non-PIC) or PIC linkle or loadle
.data, .rdata, .sdata, .rconst areas of a TNS/E native PIC linkle or
loadle
-n number Sets the minimum string length to number rather than the default length of 4.
-t format Writes each string preceded by its byte offset from the start of the le. The for-
mat depends on the single character used as the format argument, as follows:
d The offset is written in decimal.
o The offset is written in octal.
x The offset is written in hexadecimal.
DESCRIPTION
The strings command looks for strings in an ASCII or binary le.
The strings command looks for printable strings in regular les and writes the strings to the stan-
dard output le. A printable string is any sequence of four (the default value) or more printable
characters terminated by a newline or NULL character.
By default, strings scans for strings in the:
code, data, and extended data areas of a TNS or accelerated object le
.data, .rodata, and .sdata areas of a TNS/R native non-position-independent (non-PIC)
or PIC linkle or loadle
.data, .rdata, .sdata, .rconst areas of a TNS/E native PIC linkle or loadle
Operand
file Species the pathname of a regular le to be used as input. The input les can be
regular les of any format. If you do not specify a le operand, strings reads
from the standard input le.
Environment Variables
This utility supports the use of the LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and
NLSPATH environment variables.
Standard Output
Strings that are found are written to the standard output le, one per line.
When the -t ag is not specied, the format of the output is:
"%s", string
527188-003 Hewlett-Packard Company 853