• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/toolchains/hndtools-armeabi-2013.11/share/doc/arm-arm-none-eabi/html/binutils.html/
1<html lang="en">
2<head>
3<title>strings - GNU Binary Utilities</title>
4<meta http-equiv="Content-Type" content="text/html">
5<meta name="description" content="GNU Binary Utilities">
6<meta name="generator" content="makeinfo 4.13">
7<link title="Top" rel="start" href="index.html#Top">
8<link rel="prev" href="size.html#size" title="size">
9<link rel="next" href="strip.html#strip" title="strip">
10<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
11<!--
12Copyright (C) 1991-2013 Free Software Foundation, Inc.
13
14Permission is granted to copy, distribute and/or modify this document
15under the terms of the GNU Free Documentation License, Version 1.3
16or any later version published by the Free Software Foundation;
17with no Invariant Sections, with no Front-Cover Texts, and with no
18Back-Cover Texts.  A copy of the license is included in the
19section entitled ``GNU Free Documentation License''.
20
21-->
22<meta http-equiv="Content-Style-Type" content="text/css">
23<style type="text/css"><!--
24  pre.display { font-family:inherit }
25  pre.format  { font-family:inherit }
26  pre.smalldisplay { font-family:inherit; font-size:smaller }
27  pre.smallformat  { font-family:inherit; font-size:smaller }
28  pre.smallexample { font-size:smaller }
29  pre.smalllisp    { font-size:smaller }
30  span.sc    { font-variant:small-caps }
31  span.roman { font-family:serif; font-weight:normal; } 
32  span.sansserif { font-family:sans-serif; font-weight:normal; } 
33--></style>
34<link rel="stylesheet" type="text/css" href="../cs.css">
35</head>
36<body>
37<div class="node">
38<a name="strings"></a>
39<p>
40Next:&nbsp;<a rel="next" accesskey="n" href="strip.html#strip">strip</a>,
41Previous:&nbsp;<a rel="previous" accesskey="p" href="size.html#size">size</a>,
42Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
43<hr>
44</div>
45
46<h2 class="chapter">7 strings</h2>
47
48<p><a name="index-strings-123"></a><a name="index-listings-strings-124"></a><a name="index-printing-strings-125"></a><a name="index-strings_002c-printing-126"></a>
49<!-- man title strings print the strings of printable characters in files. -->
50
51<pre class="smallexample">     <!-- man begin SYNOPSIS strings -->
52     strings [<samp><span class="option">-afovV</span></samp>] [<samp><span class="option">-</span></samp><var>min-len</var>]
53             [<samp><span class="option">-n</span></samp> <var>min-len</var>] [<samp><span class="option">--bytes=</span></samp><var>min-len</var>]
54             [<samp><span class="option">-t</span></samp> <var>radix</var>] [<samp><span class="option">--radix=</span></samp><var>radix</var>]
55             [<samp><span class="option">-e</span></samp> <var>encoding</var>] [<samp><span class="option">--encoding=</span></samp><var>encoding</var>]
56             [<samp><span class="option">-</span></samp>] [<samp><span class="option">--all</span></samp>] [<samp><span class="option">--print-file-name</span></samp>]
57             [<samp><span class="option">-T</span></samp> <var>bfdname</var>] [<samp><span class="option">--target=</span></samp><var>bfdname</var>]
58             [<samp><span class="option">--help</span></samp>] [<samp><span class="option">--version</span></samp>] <var>file</var>...
59     <!-- man end -->
60</pre>
61   <!-- man begin DESCRIPTION strings -->
62   <p>For each <var>file</var> given, <span class="sc">gnu</span> <samp><span class="command">strings</span></samp> prints the printable
63character sequences that are at least 4 characters long (or the number
64given with the options below) and are followed by an unprintable
65character.  By default, it only prints the strings from the initialized
66and loaded sections of object files; for other types of files, it prints
67the strings from the whole file.
68
69   <p><samp><span class="command">strings</span></samp> is mainly useful for determining the contents of non-text
70files.
71
72<!-- man end -->
73<!-- man begin OPTIONS strings -->
74     <dl>
75<dt><samp><span class="env">-a</span></samp><dt><samp><span class="env">--all</span></samp><dt><samp><span class="env">-</span></samp><dd>Do not scan only the initialized and loaded sections of object files;
76scan the whole files.
77
78     <br><dt><samp><span class="env">-f</span></samp><dt><samp><span class="env">--print-file-name</span></samp><dd>Print the name of the file before each string.
79
80     <br><dt><samp><span class="env">--help</span></samp><dd>Print a summary of the program usage on the standard output and exit.
81
82     <br><dt><samp><span class="env">-</span><var>min-len</var></samp><dt><samp><span class="env">-n </span><var>min-len</var></samp><dt><samp><span class="env">--bytes=</span><var>min-len</var></samp><dd>Print sequences of characters that are at least <var>min-len</var> characters
83long, instead of the default 4.
84
85     <br><dt><samp><span class="env">-o</span></samp><dd>Like &lsquo;<samp><span class="samp">-t o</span></samp>&rsquo;.  Some other versions of <samp><span class="command">strings</span></samp> have <samp><span class="option">-o</span></samp>
86act like &lsquo;<samp><span class="samp">-t d</span></samp>&rsquo; instead.  Since we can not be compatible with both
87ways, we simply chose one.
88
89     <br><dt><samp><span class="env">-t </span><var>radix</var></samp><dt><samp><span class="env">--radix=</span><var>radix</var></samp><dd>Print the offset within the file before each string.  The single
90character argument specifies the radix of the offset&mdash;&lsquo;<samp><span class="samp">o</span></samp>&rsquo; for
91octal, &lsquo;<samp><span class="samp">x</span></samp>&rsquo; for hexadecimal, or &lsquo;<samp><span class="samp">d</span></samp>&rsquo; for decimal.
92
93     <br><dt><samp><span class="env">-e </span><var>encoding</var></samp><dt><samp><span class="env">--encoding=</span><var>encoding</var></samp><dd>Select the character encoding of the strings that are to be found. 
94Possible values for <var>encoding</var> are: &lsquo;<samp><span class="samp">s</span></samp>&rsquo; = single-7-bit-byte
95characters (ASCII, ISO 8859, etc., default), &lsquo;<samp><span class="samp">S</span></samp>&rsquo; =
96single-8-bit-byte characters, &lsquo;<samp><span class="samp">b</span></samp>&rsquo; = 16-bit bigendian, &lsquo;<samp><span class="samp">l</span></samp>&rsquo; =
9716-bit littleendian, &lsquo;<samp><span class="samp">B</span></samp>&rsquo; = 32-bit bigendian, &lsquo;<samp><span class="samp">L</span></samp>&rsquo; = 32-bit
98littleendian.  Useful for finding wide character strings. (&lsquo;<samp><span class="samp">l</span></samp>&rsquo;
99and &lsquo;<samp><span class="samp">b</span></samp>&rsquo; apply to, for example, Unicode UTF-16/UCS-2 encodings).
100
101     <br><dt><samp><span class="env">-T </span><var>bfdname</var></samp><dt><samp><span class="env">--target=</span><var>bfdname</var></samp><dd><a name="index-object-code-format-127"></a>Specify an object code format other than your system's default format. 
102See <a href="Target-Selection.html#Target-Selection">Target Selection</a>, for more information.
103
104     <br><dt><samp><span class="env">-v</span></samp><dt><samp><span class="env">-V</span></samp><dt><samp><span class="env">--version</span></samp><dd>Print the program version number on the standard output and exit. 
105</dl>
106
107<!-- man end -->
108   </body></html>
109
110