STRINGS(1)                BSD General Commands Manual               STRINGS(1)

NAME
     strings -- find printable strings in a file

SYNOPSIS
     strings [-afo] [-m number] [-n number] [-t radix] [file ...]

DESCRIPTION
     strings displays the sequences of printable characters in each of the
     specified files, or in the standard input, by default.  By default, a
     sequence must be at least four characters in length before being dis-
     played.

     The options are as follows:

     -a      By default, strings only searches the text and data segments of
             object files.  The -a option causes strings to search the entire
             object file.

     -f      Each string is preceded by the name of the file in which it was
             found.

     -m number
             Specifies the maximum number of characters in a sequence to be
             number, instead of unlimited.

     -n number
             Specifies the minimum number of characters in a sequence to be
             number, instead of four.

     -o      Each string is preceded by its octal offset in the file.

     -t radix
             Each string is preceded by its offset in the file.  The first
             character of radix determines the radix of the offset: 'o' for
             octal; 'd' for decimal; or 'x' for hexadecimal.

     strings is useful for identifying random binaries, among other things.

EXIT STATUS
     The strings utility exits 0 on success, and >0 if an error occurs.

SEE ALSO
     hexdump(1), od(1)

STANDARDS
     The strings utility is compliant with the IEEE Std 1003.1-2008
     (``POSIX.1'') specification.

     The flags [-fmo] are extensions to that specification.

     Historic implementations of strings only search the initialized data por-
     tion of the object file.  This was reasonable as strings were normally
     stored there.  Given new compiler technology which installs strings in
     the text portion of the object file, the default behavior was changed.

HISTORY
     The strings utility appeared in 3.0BSD.

BUGS
     The algorithm for identifying strings is extremely primitive.  In partic-
     ular, machine code instructions on certain architectures can resemble
     sequences of ASCII bytes, which will fool the algorithm.

BSD                             August 10, 2012                            BSD
