• 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-2011.09/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, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
132000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
14Free Software Foundation, Inc.
15
16Permission is granted to copy, distribute and/or modify this document
17under the terms of the GNU Free Documentation License, Version 1.3
18or any later version published by the Free Software Foundation;
19with no Invariant Sections, with no Front-Cover Texts, and with no
20Back-Cover Texts.  A copy of the license is included in the
21section entitled ``GNU Free Documentation License''.
22
23-->
24<meta http-equiv="Content-Style-Type" content="text/css">
25<style type="text/css"><!--
26  pre.display { font-family:inherit }
27  pre.format  { font-family:inherit }
28  pre.smalldisplay { font-family:inherit; font-size:smaller }
29  pre.smallformat  { font-family:inherit; font-size:smaller }
30  pre.smallexample { font-size:smaller }
31  pre.smalllisp    { font-size:smaller }
32  span.sc    { font-variant:small-caps }
33  span.roman { font-family:serif; font-weight:normal; } 
34  span.sansserif { font-family:sans-serif; font-weight:normal; } 
35--></style>
36<link rel="stylesheet" type="text/css" href="../cs.css">
37</head>
38<body>
39<div class="node">
40<a name="strings"></a>
41<p>
42Next:&nbsp;<a rel="next" accesskey="n" href="strip.html#strip">strip</a>,
43Previous:&nbsp;<a rel="previous" accesskey="p" href="size.html#size">size</a>,
44Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
45<hr>
46</div>
47
48<h2 class="chapter">7 strings</h2>
49
50<p><a name="index-strings-112"></a><a name="index-listings-strings-113"></a><a name="index-printing-strings-114"></a><a name="index-strings_002c-printing-115"></a>
51<!-- man title strings print the strings of printable characters in files. -->
52
53<pre class="smallexample">     <!-- man begin SYNOPSIS strings -->
54     strings [<samp><span class="option">-afovV</span></samp>] [<samp><span class="option">-</span></samp><var>min-len</var>]
55             [<samp><span class="option">-n</span></samp> <var>min-len</var>] [<samp><span class="option">--bytes=</span></samp><var>min-len</var>]
56             [<samp><span class="option">-t</span></samp> <var>radix</var>] [<samp><span class="option">--radix=</span></samp><var>radix</var>]
57             [<samp><span class="option">-e</span></samp> <var>encoding</var>] [<samp><span class="option">--encoding=</span></samp><var>encoding</var>]
58             [<samp><span class="option">-</span></samp>] [<samp><span class="option">--all</span></samp>] [<samp><span class="option">--print-file-name</span></samp>]
59             [<samp><span class="option">-T</span></samp> <var>bfdname</var>] [<samp><span class="option">--target=</span></samp><var>bfdname</var>]
60             [<samp><span class="option">--help</span></samp>] [<samp><span class="option">--version</span></samp>] <var>file</var>...
61     <!-- man end -->
62</pre>
63   <!-- man begin DESCRIPTION strings -->
64   <p>For each <var>file</var> given, <span class="sc">gnu</span> <samp><span class="command">strings</span></samp> prints the printable
65character sequences that are at least 4 characters long (or the number
66given with the options below) and are followed by an unprintable
67character.  By default, it only prints the strings from the initialized
68and loaded sections of object files; for other types of files, it prints
69the strings from the whole file.
70
71   <p><samp><span class="command">strings</span></samp> is mainly useful for determining the contents of non-text
72files.
73
74<!-- man end -->
75<!-- man begin OPTIONS strings -->
76     <dl>
77<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;
78scan the whole files.
79
80     <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.
81
82     <br><dt><samp><span class="env">--help</span></samp><dd>Print a summary of the program usage on the standard output and exit.
83
84     <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
85long, instead of the default 4.
86
87     <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>
88act like &lsquo;<samp><span class="samp">-t d</span></samp>&rsquo; instead.  Since we can not be compatible with both
89ways, we simply chose one.
90
91     <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
92character argument specifies the radix of the offset&mdash;&lsquo;<samp><span class="samp">o</span></samp>&rsquo; for
93octal, &lsquo;<samp><span class="samp">x</span></samp>&rsquo; for hexadecimal, or &lsquo;<samp><span class="samp">d</span></samp>&rsquo; for decimal.
94
95     <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. 
96Possible values for <var>encoding</var> are: &lsquo;<samp><span class="samp">s</span></samp>&rsquo; = single-7-bit-byte
97characters (ASCII, ISO 8859, etc., default), &lsquo;<samp><span class="samp">S</span></samp>&rsquo; =
98single-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; =
9916-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
100littleendian.  Useful for finding wide character strings. (&lsquo;<samp><span class="samp">l</span></samp>&rsquo;
101and &lsquo;<samp><span class="samp">b</span></samp>&rsquo; apply to, for example, Unicode UTF-16/UCS-2 encodings).
102
103     <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-116"></a>Specify an object code format other than your system's default format. 
104See <a href="Target-Selection.html#Target-Selection">Target Selection</a>, for more information.
105
106     <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. 
107</dl>
108
109<!-- man end -->
110   </body></html>
111
112