1STRINGS(1)                   GNU Development Tools                  STRINGS(1)
2
3
4

NAME

6       strings - print the sequences of printable characters in files
7

SYNOPSIS

9       strings [-afovV] [-min-len]
10               [-n min-len] [--bytes=min-len]
11               [-t radix] [--radix=radix]
12               [-e encoding] [--encoding=encoding]
13               [-] [--all] [--print-file-name]
14               [-T bfdname] [--target=bfdname]
15               [-w] [--include-all-whitespace]
16               [-s] [--output-separatorsep_string]
17               [--help] [--version] file...
18

DESCRIPTION

20       For each file given, GNU strings prints the printable character
21       sequences that are at least 4 characters long (or the number given with
22       the options below) and are followed by an unprintable character.
23
24       Depending upon how the strings program was configured it will default
25       to either displaying all the printable sequences that it can find in
26       each file, or only those sequences that are in loadable, initialized
27       data sections.  If the file type in unrecognizable, or if strings is
28       reading from stdin then it will always display all of the printable
29       sequences that it can find.
30
31       For backwards compatibility any file that occurs after a command-line
32       option of just - will also be scanned in full, regardless of the
33       presence of any -d option.
34
35       strings is mainly useful for determining the contents of non-text
36       files.
37

OPTIONS

39       -a
40       --all
41       -   Scan the whole file, regardless of what sections it contains or
42           whether those sections are loaded or initialized.  Normally this is
43           the default behaviour, but strings can be configured so that the -d
44           is the default instead.
45
46           The - option is position dependent and forces strings to perform
47           full scans of any file that is mentioned after the - on the command
48           line, even if the -d option has been specified.
49
50       -d
51       --data
52           Only print strings from initialized, loaded data sections in the
53           file.  This may reduce the amount of garbage in the output, but it
54           also exposes the strings program to any security flaws that may be
55           present in the BFD library used to scan and load sections.  Strings
56           can be configured so that this option is the default behaviour.  In
57           such cases the -a option can be used to avoid using the BFD library
58           and instead just print all of the strings found in the file.
59
60       -f
61       --print-file-name
62           Print the name of the file before each string.
63
64       --help
65           Print a summary of the program usage on the standard output and
66           exit.
67
68       -min-len
69       -n min-len
70       --bytes=min-len
71           Print sequences of characters that are at least min-len characters
72           long, instead of the default 4.
73
74       -o  Like -t o.  Some other versions of strings have -o act like -t d
75           instead.  Since we can not be compatible with both ways, we simply
76           chose one.
77
78       -t radix
79       --radix=radix
80           Print the offset within the file before each string.  The single
81           character argument specifies the radix of the offset---o for octal,
82           x for hexadecimal, or d for decimal.
83
84       -e encoding
85       --encoding=encoding
86           Select the character encoding of the strings that are to be found.
87           Possible values for encoding are: s = single-7-bit-byte characters
88           (ASCII, ISO 8859, etc., default), S = single-8-bit-byte characters,
89           b = 16-bit bigendian, l = 16-bit littleendian, B = 32-bit
90           bigendian, L = 32-bit littleendian.  Useful for finding wide
91           character strings. (l and b apply to, for example, Unicode
92           UTF-16/UCS-2 encodings).
93
94       -T bfdname
95       --target=bfdname
96           Specify an object code format other than your system's default
97           format.
98
99       -v
100       -V
101       --version
102           Print the program version number on the standard output and exit.
103
104       -w
105       --include-all-whitespace
106           By default tab and space characters are included in the strings
107           that are displayed, but other whitespace characters, such a
108           newlines and carriage returns, are not.  The -w option changes this
109           so that all whitespace characters are considered to be part of a
110           string.
111
112       -s
113       --output-separator
114           By default, output strings are delimited by a new-line. This option
115           allows you to supply any string to be used as the output record
116           separator.  Useful with --include-all-whitespace where strings may
117           contain new-lines internally.
118
119       @file
120           Read command-line options from file.  The options read are inserted
121           in place of the original @file option.  If file does not exist, or
122           cannot be read, then the option will be treated literally, and not
123           removed.
124
125           Options in file are separated by whitespace.  A whitespace
126           character may be included in an option by surrounding the entire
127           option in either single or double quotes.  Any character (including
128           a backslash) may be included by prefixing the character to be
129           included with a backslash.  The file may itself contain additional
130           @file options; any such options will be processed recursively.
131

SEE ALSO

133       ar(1), nm(1), objdump(1), ranlib(1), readelf(1) and the Info entries
134       for binutils.
135
137       Copyright (c) 1991-2020 Free Software Foundation, Inc.
138
139       Permission is granted to copy, distribute and/or modify this document
140       under the terms of the GNU Free Documentation License, Version 1.3 or
141       any later version published by the Free Software Foundation; with no
142       Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
143       Texts.  A copy of the license is included in the section entitled "GNU
144       Free Documentation License".
145
146
147
148binutils-2.34                     2020-02-17                        STRINGS(1)
Impressum