Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)
strings(1) OSS Shell and Utilities Reference Manual
NAME
strings - Finds printable strings in binary files
SYNOPSIS
strings [-a][-t format][-n number][file ...]
FLAGS
-a Searches an entire object file, linkfile, or loadfile rather than just the:
• Code, data, and extended data areas of a TNS or accelerated object file
• .data, .rodata, and .sdata areas of a TNS/R native non-position-
independent (non-PIC) or PIC linkfile or loadfile
• .data, .rdata, .sdata, .rconst areas of a TNS/E native PIC linkfile or
loadfile
-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 file. 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 file.
The strings command looks for printable strings in regular files and writes the strings to the stan-
dard output file. 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 file
• .data, .rodata, and .sdata areas of a TNS/R native non-position-independent (non-PIC)
or PIC linkfile or loadfile
• .data, .rdata, .sdata, .rconst areas of a TNS/E native PIC linkfile or loadfile
Operand
file Specifies the pathname of a regular file to be used as input. The input files can be
regular files of any format. If you do not specify a file operand, strings reads
from the standard input file.
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 file, one per line.
• When the -t flag is not specified, the format of the output is:
"%s", string
8−60 Hewlett-Packard Company 527188-021