strings(C)


strings -- find the printable strings in an object file

Syntax

strings [ - ] [ -aoCF ] [ -num ] [-t format ] [ -n num ] [ file ... ]

Description

The strings command looks for printable strings in a binary file. A string is any sequence of four or more printing characters. When searching Common Object File Format (COFF) binaries, strings only looks in the initialized data section of the file. (To make strings search the whole of a COFF binary, use the -a or - flags. COFF is the standard file format for compiled executables.) All other files are searched in their entirety.

The following options are recognized by strings:


-a
Scan files in their entirety.

-
Synonym for -a.

-n num
Specify the minimum string length to report; default value is 4 characters.

-num
Same as -n num.

-t format
Write each string preceded by its byte offset in the file. The format used for the offset is:

d
decimal

o
octal

x
hexadecimal

-o
Same as -t d.

-C
Recognize only C language strings. strings normally selects strings of four or more printable characters. This option adds the requirement that strings be terminated with either a null or newline character.

-F
Precede each string by the name of the file it was found in.

See also

hd(C), od(C)

Standards conformance

strings is conformant with:

ISO/IEC DIS 9945-2:1992, Information technology - Portable Operating System Interface (POSIX) - Part 2: Shell and Utilities (IEEE Std 1003.2-1992);
X/Open CAE Specification, Commands and Utilities, Issue 4, 1992.


© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005