[BACK]Return to strings.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / strings

Annotation of src/usr.bin/strings/strings.1, Revision 1.1

1.1     ! deraadt     1: .\"    $NetBSD: strings.1,v 1.4 1994/12/10 11:54:28 jtc Exp $
        !             2: .\"
        !             3: .\" Copyright (c) 1980, 1990, 1993
        !             4: .\"    The Regents of the University of California.  All rights reserved.
        !             5: .\"
        !             6: .\" Redistribution and use in source and binary forms, with or without
        !             7: .\" modification, are permitted provided that the following conditions
        !             8: .\" are met:
        !             9: .\" 1. Redistributions of source code must retain the above copyright
        !            10: .\"    notice, this list of conditions and the following disclaimer.
        !            11: .\" 2. Redistributions in binary form must reproduce the above copyright
        !            12: .\"    notice, this list of conditions and the following disclaimer in the
        !            13: .\"    documentation and/or other materials provided with the distribution.
        !            14: .\" 3. All advertising materials mentioning features or use of this software
        !            15: .\"    must display the following acknowledgement:
        !            16: .\"    This product includes software developed by the University of
        !            17: .\"    California, Berkeley and its contributors.
        !            18: .\" 4. Neither the name of the University nor the names of its contributors
        !            19: .\"    may be used to endorse or promote products derived from this software
        !            20: .\"    without specific prior written permission.
        !            21: .\"
        !            22: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
        !            23: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        !            24: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
        !            25: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
        !            26: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        !            27: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
        !            28: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
        !            29: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
        !            30: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
        !            31: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
        !            32: .\" SUCH DAMAGE.
        !            33: .\"
        !            34: .\"     @(#)strings.1  8.1 (Berkeley) 6/6/93
        !            35: .\"
        !            36: .Dd June 6, 1993
        !            37: .Dt STRINGS 1
        !            38: .Os
        !            39: .Sh NAME
        !            40: .Nm strings
        !            41: .Nd find printable strings in a file
        !            42: .Sh SYNOPSIS
        !            43: .Nm strings
        !            44: .Op Fl afo
        !            45: .Op Fl n Ar number
        !            46: .Op Fl t Ar radix
        !            47: .Op Ar file ...
        !            48: .Sh DESCRIPTION
        !            49: .Nm Strings
        !            50: displays the sequences of printable characters in each of the specified
        !            51: files, or in the standard input, by default.
        !            52: By default, a sequence must be at least four characters in length
        !            53: before being displayed.
        !            54: .Pp
        !            55: The options are as follows:
        !            56: .Bl -tag -width Ds
        !            57: .It Fl a
        !            58: By default,
        !            59: .Nm strings
        !            60: only searches the text and data segments of object files.
        !            61: The
        !            62: .Fl a
        !            63: option causes
        !            64: .Nm strings
        !            65: to search the entire object file.
        !            66: .It Fl f
        !            67: Each string is preceded by the name of the file
        !            68: in which it was found.
        !            69: .It Fl n
        !            70: Specifies the minimum number of characters in a sequence to be
        !            71: .Ar number ,
        !            72: instead of four.
        !            73: .It Fl o
        !            74: Each string is preceded by its octal offset in the file.
        !            75: .It Fl t
        !            76: Each string is preceded by its offset in the file.  The first character of
        !            77: .Ar radix
        !            78: determines the radix of the offset:
        !            79: .Sq o
        !            80: for octal;
        !            81: .Sq d
        !            82: for decimal; or
        !            83: .Sq x
        !            84: for hexadecimal.
        !            85: .El
        !            86: .Pp
        !            87: .Nm Strings
        !            88: is useful for identifying random binaries, among other things.
        !            89: .Sh SEE ALSO
        !            90: .Xr hexdump 1 ,
        !            91: .Xr od 1
        !            92: .Sh BUGS
        !            93: The algorithm for identifying strings is extremely primitive.
        !            94: In particular, machine code instructions on certain architectures
        !            95: can resemble sequences of ASCII bytes, which
        !            96: will fool the algorithm.
        !            97: .Sh COMPATIBILITY
        !            98: Historic implementations of
        !            99: .Nm
        !           100: only search the initialized data portion of the object file.
        !           101: This was reasonable as strings were normally stored there.
        !           102: Given new compiler technology which installs strings in the
        !           103: text portion of the object file, the default behavior was
        !           104: changed.
        !           105: .Sh STANDARDS
        !           106: The
        !           107: .Nm
        !           108: utility conforms to
        !           109: .St -p1003.2-92 .
        !           110: .Sh HISTORY
        !           111: The
        !           112: .Nm
        !           113: utility appeared in
        !           114: .Bx 3.0 .