STRINGS(1)

NAME
strings - print the strings of printable characters in files

SYNOPSIS
strings [--all] [--bytes=number] [--encoding=encoding] [--help] [--print-file-name] [--radix=radix] [--version] [-afhov] [- number] [-e encoding] [-n number] [-t radix] [file ...]

DESCRIPTION
For each file specified, the strings utility prints contiguous sequences of printable characters that are at least n characters long and are followed by an unprintable character. The default value of n is 4. By default, the strings utility only scans the initialized and loaded sections of ELF objects; for other file types, the entire file is scanned. The strings utility is mainly used for determining the contents of non-text files.

If no file name is specified as an argument, standard input is read.

The following options are available:

--all
    For ELF objects, scan the entire file for printable strings.

--encoding=encoding
    Select the character encoding to be used while searching for strings. Valid values for argument encoding are:
    s   for single 7-bit-byte characters (ASCII, ISO 8859).
    S   for single 8-bit-byte characters.
    l   for 16-bit little-endian.
    b   for 16-bit big-endian.
    L   for 32-bit little-endian.
    B   for 32-bit big-endian.
    The default is to assume that characters are encoded using a single 7-bit byte.

--print-file-name
    Print the name of the file before each string.

--radix=radix
    Print the offset from the start of the file before each string using the specified radix. Valid values for argument radix are:
    d   for decimal
    o   for octal
    x   for hexadecimal

    --bytes=number | - number Print the contiguous character sequence of at least number characters long, instead of default of 4 characters.

--help
    This prints a usage summary and exits.

--version
    Display a version identifier and exit.

-a  Equivalent to specifying option --all.

-e encoding
    Equivalent to specifying option --encoding=encoding.

-f  Equivalent to specifying option --print-file-name.

-h  Equivalent to specifying option --help.

-n number
    Equivalent to specifying option --bytes=number.

-o  Equivalent to specifying option --radix=o.

-t radix
    Equivalent to specifying option --radix=radix.

-v  Equivalent to specifying option --version.

EXIT STATUS

EXAMPLES
To display strings in /bin/ls use:
    $ strings /bin/ls

To display strings in all sections of /bin/ln use:
    $ strings -a /bin/ln

To display strings in all sections of /bin/cat prefixed with the filename and the offset within the file use:
    $ strings -a -f -t x /bin/cat

SEE ALSO
ar(1), nm(1), objdump(1), ranlib, readelf(1), size(1)

HISTORY
The first FreeBSD strings utility appeared in FreeBSD v3. It was later discontinued in FreeBSD v5, when i386-only a.out format was dropped in favor of ELF.

AUTHORS
-nosplit The strings utility was re-written by S.Sam Arun Raj <samarunraj@gmail.com>. This manual page was written by S.Sam Arun Raj <samarunraj@gmail.com>.