strings(1) strings(1)
strings - find printable strings in an object file or binary
strings [ -a ] [ -o ] [ -number ] filename . . .
or the XPG4 format
strings [ -a ] [ -t format ] [ -n number ] filename . . .
The strings command looks for ASCII strings in a binary file. A string
is any sequence of 4 or more printing characters ending with a newline or
a null character, or (if not in XPG4 mode) any non-printing character.
strings is useful for identifying random object files and many other
things.
The following options are available:
-a Look everywhere in the file for strings. If this flag is
omitted, strings only looks in the initialized data space of
object files.
-o Precede each string by its offset in the file.
-number Use number as the minimum string length rather than 4.
The following are the options for the XPG4 command-line format:
-a Look everywhere in the file for strings. If this flag is
omitted, strings only looks in the initialized data space of
object files.
-t format Precede each string by its offset in the file. The format is
specified by the format argument:
d Print the offset in decimal.
o Print the offset in octal.
x Print the offset in hexadecimal.
-n number Use number as the minimum string length rather than 4.
od(1)
The algorithm for identifying strings is extremely primitive.
For the IRIX 6.5 release, this command was changed to have slightly
different semantics than the original command, to be XPG4-compliant. The
XPG4 semantics are that a string is only considered to be a valid string
if it ends with a NULL or newline character, or ends at the end of a
Page 1
strings(1) strings(1)
file. The original semantics were that a string could be ended by any
non-printing character, or end of file.
As of the 6.5.4 release, the default semantics have been returned to the
original unix semantics, unless the _XPG environment variable is set to a
value greater than zero, in which case the XPG4 semantics are used.
PPPPaaaaggggeeee 2222 [ Back ]
|