strings.1   [plain text]


.\"	$OpenBSD: strings.1,v 1.2 1996/06/26 05:39:30 deraadt Exp $
.\"	$NetBSD: strings.1,v 1.4 1994/12/10 11:54:28 jtc Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
.\"	The Regents of the University of California.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"	This product includes software developed by the University of
.\"	California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"     @(#)strings.1	8.1 (Berkeley) 6/6/93
.\"
.TH STRINGS 1 "October 23, 1997" "Apple Computer, Inc."
.SH NAME
strings \- find the printable strings in a object, or other binary, file
.SH SYNOPSIS
.B strings
[
.B \-
] [
.B \-a
] [
.B \-o
] [
\fB\-\fInumber\fR
] [file ...]
.SH DESCRIPTION
.I Strings
looks for ASCII strings in a binary file or standard input.
.I Strings
is useful for identifying random object files and many other things.
A string is any
sequence of 4 (the default) or more printing characters ending with a newline
or a null.  Unless the
.B \-
flag is given,
.I strings
looks in all sections of the object files except the (\_\^\_TEXT,\_\^\_text)
section.  If no files are specified standard input is read.
.PP
The options to
.IR strings (1)
are:
.TP
.B \-a
This option causes
.I strings
to look for strings in all sections of the object file (including the
(\_\^\_TEXT,\_\^\_text) section.
.TP
.B \-
This option causes
.I strings
to look for strings in all bytes of the files (the default for non-object files).
.TP
.B \-o
Preceded each string by its offset in the file (in decimal).
.TP
.BI \- number
The decimal
.I number
is used as the minimum string length rather than the default of 4.
.SH "SEE ALSO"
od(1)
.SH BUGS
The algorithm for identifying strings is extremely primitive.