You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
307 lines
10 KiB
Groff
307 lines
10 KiB
Groff
.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.13)
|
|
.\"
|
|
.\" Standard preamble:
|
|
.\" ========================================================================
|
|
.de Sp \" Vertical space (when we can't use .PP)
|
|
.if t .sp .5v
|
|
.if n .sp
|
|
..
|
|
.de Vb \" Begin verbatim text
|
|
.ft CW
|
|
.nf
|
|
.ne \\$1
|
|
..
|
|
.de Ve \" End verbatim text
|
|
.ft R
|
|
.fi
|
|
..
|
|
.\" Set up some character translations and predefined strings. \*(-- will
|
|
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
|
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
|
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
|
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
|
.\" nothing in troff, for use with C<>.
|
|
.tr \(*W-
|
|
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
|
.ie n \{\
|
|
. ds -- \(*W-
|
|
. ds PI pi
|
|
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
|
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
|
. ds L" ""
|
|
. ds R" ""
|
|
. ds C` ""
|
|
. ds C' ""
|
|
'br\}
|
|
.el\{\
|
|
. ds -- \|\(em\|
|
|
. ds PI \(*p
|
|
. ds L" ``
|
|
. ds R" ''
|
|
'br\}
|
|
.\"
|
|
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
|
.ie \n(.g .ds Aq \(aq
|
|
.el .ds Aq '
|
|
.\"
|
|
.\" If the F register is turned on, we'll generate index entries on stderr for
|
|
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
|
|
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
|
.\" output yourself in some meaningful fashion.
|
|
.ie \nF \{\
|
|
. de IX
|
|
. tm Index:\\$1\t\\n%\t"\\$2"
|
|
..
|
|
. nr % 0
|
|
. rr F
|
|
.\}
|
|
.el \{\
|
|
. de IX
|
|
..
|
|
.\}
|
|
.\"
|
|
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
|
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
|
. \" fudge factors for nroff and troff
|
|
.if n \{\
|
|
. ds #H 0
|
|
. ds #V .8m
|
|
. ds #F .3m
|
|
. ds #[ \f1
|
|
. ds #] \fP
|
|
.\}
|
|
.if t \{\
|
|
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
|
. ds #V .6m
|
|
. ds #F 0
|
|
. ds #[ \&
|
|
. ds #] \&
|
|
.\}
|
|
. \" simple accents for nroff and troff
|
|
.if n \{\
|
|
. ds ' \&
|
|
. ds ` \&
|
|
. ds ^ \&
|
|
. ds , \&
|
|
. ds ~ ~
|
|
. ds /
|
|
.\}
|
|
.if t \{\
|
|
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
|
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
|
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
|
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
|
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
|
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
|
.\}
|
|
. \" troff and (daisy-wheel) nroff accents
|
|
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
|
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
|
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
|
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
|
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
|
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
|
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
|
.ds ae a\h'-(\w'a'u*4/10)'e
|
|
.ds Ae A\h'-(\w'A'u*4/10)'E
|
|
. \" corrections for vroff
|
|
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
|
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
|
. \" for low resolution devices (crt and lpr)
|
|
.if \n(.H>23 .if \n(.V>19 \
|
|
\{\
|
|
. ds : e
|
|
. ds 8 ss
|
|
. ds o a
|
|
. ds d- d\h'-1'\(ga
|
|
. ds D- D\h'-1'\(hy
|
|
. ds th \o'bp'
|
|
. ds Th \o'LP'
|
|
. ds ae ae
|
|
. ds Ae AE
|
|
.\}
|
|
.rm #[ #] #H #V #F C
|
|
.\" ========================================================================
|
|
.\"
|
|
.IX Title "STRINGS 1"
|
|
.TH STRINGS 1 "2020-07-13" "binutils-2.32" "GNU Development Tools"
|
|
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
|
.\" way too many mistakes in technical documents.
|
|
.if n .ad l
|
|
.nh
|
|
.SH "NAME"
|
|
strings \- print the strings of printable characters in files.
|
|
.SH "SYNOPSIS"
|
|
.IX Header "SYNOPSIS"
|
|
strings [\fB\-afovV\fR] [\fB\-\fR\fImin-len\fR]
|
|
[\fB\-n\fR \fImin-len\fR] [\fB\-\-bytes=\fR\fImin-len\fR]
|
|
[\fB\-t\fR \fIradix\fR] [\fB\-\-radix=\fR\fIradix\fR]
|
|
[\fB\-e\fR \fIencoding\fR] [\fB\-\-encoding=\fR\fIencoding\fR]
|
|
[\fB\-\fR] [\fB\-\-all\fR] [\fB\-\-print\-file\-name\fR]
|
|
[\fB\-T\fR \fIbfdname\fR] [\fB\-\-target=\fR\fIbfdname\fR]
|
|
[\fB\-w\fR] [\fB\-\-include\-all\-whitespace\fR]
|
|
[\fB\-s\fR] [\fB\-\-output\-separator\fR\fIsep_string\fR]
|
|
[\fB\-\-help\fR] [\fB\-\-version\fR] \fIfile\fR...
|
|
.SH "DESCRIPTION"
|
|
.IX Header "DESCRIPTION"
|
|
For each \fIfile\fR given, \s-1GNU\s0 \fBstrings\fR prints the
|
|
printable character sequences that are at least 4 characters long (or
|
|
the number given with the options below) and are followed by an
|
|
unprintable character.
|
|
.PP
|
|
Depending upon how the strings program was configured it will default
|
|
to either displaying all the printable sequences that it can find in
|
|
each file, or only those sequences that are in loadable, initialized
|
|
data sections. If the file type in unrecognizable, or if strings is
|
|
reading from stdin then it will always display all of the printable
|
|
sequences that it can find.
|
|
.PP
|
|
For backwards compatibility any file that occurs after a command-line
|
|
option of just \fB\-\fR will also be scanned in full, regardless of
|
|
the presence of any \fB\-d\fR option.
|
|
.PP
|
|
\&\fBstrings\fR is mainly useful for determining the contents of
|
|
non-text files.
|
|
.SH "OPTIONS"
|
|
.IX Header "OPTIONS"
|
|
.IP "\fB\-a\fR" 4
|
|
.IX Item "-a"
|
|
.PD 0
|
|
.IP "\fB\-\-all\fR" 4
|
|
.IX Item "--all"
|
|
.IP "\fB\-\fR" 4
|
|
.IX Item "-"
|
|
.PD
|
|
Scan the whole file, regardless of what sections it contains or
|
|
whether those sections are loaded or initialized. Normally this is
|
|
the default behaviour, but strings can be configured so that the
|
|
\&\fB\-d\fR is the default instead.
|
|
.Sp
|
|
The \fB\-\fR option is position dependent and forces strings to
|
|
perform full scans of any file that is mentioned after the \fB\-\fR
|
|
on the command line, even if the \fB\-d\fR option has been
|
|
specified.
|
|
.IP "\fB\-d\fR" 4
|
|
.IX Item "-d"
|
|
.PD 0
|
|
.IP "\fB\-\-data\fR" 4
|
|
.IX Item "--data"
|
|
.PD
|
|
Only print strings from initialized, loaded data sections in the
|
|
file. This may reduce the amount of garbage in the output, but it
|
|
also exposes the strings program to any security flaws that may be
|
|
present in the \s-1BFD\s0 library used to scan and load sections. Strings
|
|
can be configured so that this option is the default behaviour. In
|
|
such cases the \fB\-a\fR option can be used to avoid using the \s-1BFD\s0
|
|
library and instead just print all of the strings found in the file.
|
|
.IP "\fB\-f\fR" 4
|
|
.IX Item "-f"
|
|
.PD 0
|
|
.IP "\fB\-\-print\-file\-name\fR" 4
|
|
.IX Item "--print-file-name"
|
|
.PD
|
|
Print the name of the file before each string.
|
|
.IP "\fB\-\-help\fR" 4
|
|
.IX Item "--help"
|
|
Print a summary of the program usage on the standard output and exit.
|
|
.IP "\fB\-\fR\fImin-len\fR" 4
|
|
.IX Item "-min-len"
|
|
.PD 0
|
|
.IP "\fB\-n\fR \fImin-len\fR" 4
|
|
.IX Item "-n min-len"
|
|
.IP "\fB\-\-bytes=\fR\fImin-len\fR" 4
|
|
.IX Item "--bytes=min-len"
|
|
.PD
|
|
Print sequences of characters that are at least \fImin-len\fR characters
|
|
long, instead of the default 4.
|
|
.IP "\fB\-o\fR" 4
|
|
.IX Item "-o"
|
|
Like \fB\-t o\fR. Some other versions of \fBstrings\fR have \fB\-o\fR
|
|
act like \fB\-t d\fR instead. Since we can not be compatible with both
|
|
ways, we simply chose one.
|
|
.IP "\fB\-t\fR \fIradix\fR" 4
|
|
.IX Item "-t radix"
|
|
.PD 0
|
|
.IP "\fB\-\-radix=\fR\fIradix\fR" 4
|
|
.IX Item "--radix=radix"
|
|
.PD
|
|
Print the offset within the file before each string. The single
|
|
character argument specifies the radix of the offset\-\-\-\fBo\fR for
|
|
octal, \fBx\fR for hexadecimal, or \fBd\fR for decimal.
|
|
.IP "\fB\-e\fR \fIencoding\fR" 4
|
|
.IX Item "-e encoding"
|
|
.PD 0
|
|
.IP "\fB\-\-encoding=\fR\fIencoding\fR" 4
|
|
.IX Item "--encoding=encoding"
|
|
.PD
|
|
Select the character encoding of the strings that are to be found.
|
|
Possible values for \fIencoding\fR are: \fBs\fR = single\-7\-bit\-byte
|
|
characters (\s-1ASCII\s0, \s-1ISO\s0 8859, etc., default), \fBS\fR =
|
|
single\-8\-bit\-byte characters, \fBb\fR = 16\-bit bigendian, \fBl\fR =
|
|
16\-bit littleendian, \fBB\fR = 32\-bit bigendian, \fBL\fR = 32\-bit
|
|
littleendian. Useful for finding wide character strings. (\fBl\fR
|
|
and \fBb\fR apply to, for example, Unicode \s-1UTF\-16/UCS\-2\s0 encodings).
|
|
.IP "\fB\-T\fR \fIbfdname\fR" 4
|
|
.IX Item "-T bfdname"
|
|
.PD 0
|
|
.IP "\fB\-\-target=\fR\fIbfdname\fR" 4
|
|
.IX Item "--target=bfdname"
|
|
.PD
|
|
Specify an object code format other than your system's default format.
|
|
.IP "\fB\-v\fR" 4
|
|
.IX Item "-v"
|
|
.PD 0
|
|
.IP "\fB\-V\fR" 4
|
|
.IX Item "-V"
|
|
.IP "\fB\-\-version\fR" 4
|
|
.IX Item "--version"
|
|
.PD
|
|
Print the program version number on the standard output and exit.
|
|
.IP "\fB\-w\fR" 4
|
|
.IX Item "-w"
|
|
.PD 0
|
|
.IP "\fB\-\-include\-all\-whitespace\fR" 4
|
|
.IX Item "--include-all-whitespace"
|
|
.PD
|
|
By default tab and space characters are included in the strings that
|
|
are displayed, but other whitespace characters, such a newlines and
|
|
carriage returns, are not. The \fB\-w\fR option changes this so
|
|
that all whitespace characters are considered to be part of a string.
|
|
.IP "\fB\-s\fR" 4
|
|
.IX Item "-s"
|
|
.PD 0
|
|
.IP "\fB\-\-output\-separator\fR" 4
|
|
.IX Item "--output-separator"
|
|
.PD
|
|
By default, output strings are delimited by a new-line. This option
|
|
allows you to supply any string to be used as the output record
|
|
separator. Useful with \-\-include\-all\-whitespace where strings
|
|
may contain new-lines internally.
|
|
.IP "\fB@\fR\fIfile\fR" 4
|
|
.IX Item "@file"
|
|
Read command-line options from \fIfile\fR. The options read are
|
|
inserted in place of the original @\fIfile\fR option. If \fIfile\fR
|
|
does not exist, or cannot be read, then the option will be treated
|
|
literally, and not removed.
|
|
.Sp
|
|
Options in \fIfile\fR are separated by whitespace. A whitespace
|
|
character may be included in an option by surrounding the entire
|
|
option in either single or double quotes. Any character (including a
|
|
backslash) may be included by prefixing the character to be included
|
|
with a backslash. The \fIfile\fR may itself contain additional
|
|
@\fIfile\fR options; any such options will be processed recursively.
|
|
.SH "SEE ALSO"
|
|
.IX Header "SEE ALSO"
|
|
\&\fIar\fR\|(1), \fInm\fR\|(1), \fIobjdump\fR\|(1), \fIranlib\fR\|(1), \fIreadelf\fR\|(1)
|
|
and the Info entries for \fIbinutils\fR.
|
|
.SH "COPYRIGHT"
|
|
.IX Header "COPYRIGHT"
|
|
Copyright (c) 1991\-2019 Free Software Foundation, Inc.
|
|
.PP
|
|
Permission is granted to copy, distribute and/or modify this document
|
|
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3
|
|
or any later version published by the Free Software Foundation;
|
|
with no Invariant Sections, with no Front-Cover Texts, and with no
|
|
Back-Cover Texts. A copy of the license is included in the
|
|
section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
|