93 lines
2.6 KiB
Groff
93 lines
2.6 KiB
Groff
'\"macro stdmacro
|
|
.if n .pH g1.strings @(#)strings 40.8 of 4/12/91
|
|
.\" Copyright 1991 UNIX System Laboratories, Inc.
|
|
.\" Copyright 1989, 1990 AT&T
|
|
.\" Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved.
|
|
.nr X
|
|
.if \nX=0 .ds x} strings 1 "Directory and File Management Utilities" "\&"
|
|
.if \nX=1 .ds x} strings 1 "Directory and File Management Utilities"
|
|
.if \nX=2 .ds x} strings 1 "" "\&"
|
|
.if \nX=3 .ds x} strings "" "" "\&"
|
|
.TH \*(x}
|
|
.SH NAME
|
|
\f4strings\f1 \- find printable strings in an object file or binary
|
|
.SH SYNOPSIS
|
|
\f4strings\f1 [ \f4\-a\f1 ] [ \f4\-o\f1 ] [ -\f2number\f1 ] \f2filename\f1 .\ .\ .
|
|
.P
|
|
or the XPG4 format
|
|
.P
|
|
\f4strings\f1 [ \f4\-a\f1 ] [ \f4\-t\f1 \f2format\f1 ] [ \f4\-n\f1 \f2number\f1 ] \f2filename\f1 .\ .\ .
|
|
.SH DESCRIPTION
|
|
The
|
|
\f4strings\f1
|
|
command looks for
|
|
.SM 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.
|
|
.P
|
|
\f4strings\f1
|
|
is useful for identifying random object files and many other things.
|
|
.P
|
|
The following options are available:
|
|
.TP 12
|
|
\f4\-a\f1
|
|
Look everywhere in the file for strings.
|
|
If this flag is omitted,
|
|
\f4strings\f1
|
|
only looks in the initialized data space of object files.
|
|
.TP
|
|
\f4\-o\f1
|
|
Precede each string by its
|
|
offset in the file.
|
|
.TP
|
|
\f4\-\f2number\f1
|
|
Use
|
|
.I number
|
|
as the minimum string length rather than 4.
|
|
.P
|
|
The following are the options for the XPG4 command-line format:
|
|
.TP 12
|
|
\f4\-a\f1
|
|
Look everywhere in the file for strings.
|
|
If this flag is omitted,
|
|
\f4strings\f1
|
|
only looks in the initialized data space of object files.
|
|
.TP
|
|
\f4\-t \f2format\f1
|
|
Precede each string by its offset in the file.
|
|
The format is specified by the
|
|
.I format
|
|
argument:
|
|
.br
|
|
\f4d\f1 Print the offset in decimal.
|
|
.br
|
|
\f4o\f1 Print the offset in octal.
|
|
.br
|
|
\f4x\f1 Print the offset in hexadecimal.
|
|
.TP
|
|
\f4\-n \f2number\f1
|
|
Use
|
|
.I number
|
|
as the minimum string length rather than 4.
|
|
.SH "SEE ALSO"
|
|
\f4od\fP(1)
|
|
.SH NOTES
|
|
The algorithm for identifying strings is extremely primitive.
|
|
.PP
|
|
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 file. The original semantics were that a string could be ended
|
|
by any non-printing character, or end of file.
|
|
.PP
|
|
As of the 6.5.4 release, the default semantics have been returned to
|
|
the original unix semantics, unless the \f3_XPG\fP environment variable
|
|
is set to a value greater than zero, in which case the XPG4 semantics
|
|
are used.
|