1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
5 | %general-entities;
|
---|
6 | ]>
|
---|
7 |
|
---|
8 | <sect1 id="ch-system-findutils" role="wrap">
|
---|
9 | <?dbhtml filename="findutils.html"?>
|
---|
10 |
|
---|
11 | <sect1info condition="script">
|
---|
12 | <productname>findutils</productname>
|
---|
13 | <productnumber>&findutils-version;</productnumber>
|
---|
14 | <address>&findutils-url;</address>
|
---|
15 | </sect1info>
|
---|
16 |
|
---|
17 | <title>Findutils-&findutils-version;</title>
|
---|
18 |
|
---|
19 | <indexterm zone="ch-system-findutils">
|
---|
20 | <primary sortas="a-Findutils">Findutils</primary>
|
---|
21 | </indexterm>
|
---|
22 |
|
---|
23 | <sect2 role="package">
|
---|
24 | <title/>
|
---|
25 |
|
---|
26 | <para>The Findutils package contains programs to find files. These programs
|
---|
27 | are provided to recursively search through a directory tree and to
|
---|
28 | create, maintain, and search a database (often faster than the recursive
|
---|
29 | find, but unreliable if the database has not been recently updated).</para>
|
---|
30 |
|
---|
31 | <segmentedlist>
|
---|
32 | <segtitle>&buildtime;</segtitle>
|
---|
33 | <segtitle>&diskspace;</segtitle>
|
---|
34 |
|
---|
35 | <seglistitem>
|
---|
36 | <seg>&findutils-ch6-sbu;</seg>
|
---|
37 | <seg>&findutils-ch6-du;</seg>
|
---|
38 | </seglistitem>
|
---|
39 | </segmentedlist>
|
---|
40 |
|
---|
41 | </sect2>
|
---|
42 |
|
---|
43 | <sect2 role="installation">
|
---|
44 | <title>Installation of Findutils</title>
|
---|
45 |
|
---|
46 | <para>Prepare Findutils for compilation:</para>
|
---|
47 |
|
---|
48 | <screen><userinput remap="configure">./configure --prefix=/usr --libexecdir=/usr/lib/findutils \
|
---|
49 | --localstatedir=/var/lib/locate</userinput></screen>
|
---|
50 |
|
---|
51 | <variablelist>
|
---|
52 | <title>The meaning of the configure options:</title>
|
---|
53 |
|
---|
54 | <varlistentry>
|
---|
55 | <term><parameter>--localstatedir</parameter></term>
|
---|
56 | <listitem>
|
---|
57 | <para>This option changes the location of the <command>locate</command>
|
---|
58 | database to be in <filename class="directory">/var/lib/locate</filename>,
|
---|
59 | which is FHS-compliant.</para>
|
---|
60 | </listitem>
|
---|
61 | </varlistentry>
|
---|
62 |
|
---|
63 | </variablelist>
|
---|
64 |
|
---|
65 | <para>Compile the package:</para>
|
---|
66 |
|
---|
67 | <screen><userinput remap="make">make</userinput></screen>
|
---|
68 |
|
---|
69 | <para>To test the results, issue:</para>
|
---|
70 |
|
---|
71 | <screen><userinput remap="test">make check</userinput></screen>
|
---|
72 |
|
---|
73 | <para>Install the package:</para>
|
---|
74 |
|
---|
75 | <screen><userinput remap="install">make install</userinput></screen>
|
---|
76 |
|
---|
77 | <para>Some of the scripts in the LFS-Bootscripts package depend on
|
---|
78 | <command>find</command>. As <filename class="directory">/usr</filename>
|
---|
79 | may not be available during the early stages of booting, this program
|
---|
80 | needs to be on the root partition. The <command>updatedb</command>
|
---|
81 | script also needs to be modified to correct an explicit path:</para>
|
---|
82 |
|
---|
83 | <screen><userinput remap="install">mv -v /usr/bin/find /bin
|
---|
84 | sed -i -e 's/find:=${BINDIR}/find:=\/bin/' /usr/bin/updatedb</userinput></screen>
|
---|
85 |
|
---|
86 | </sect2>
|
---|
87 |
|
---|
88 | <sect2 id="contents-findutils" role="content">
|
---|
89 | <title>Contents of Findutils</title>
|
---|
90 |
|
---|
91 | <segmentedlist>
|
---|
92 | <segtitle>Installed programs</segtitle>
|
---|
93 |
|
---|
94 | <seglistitem>
|
---|
95 | <seg>bigram, code, find, frcode, locate, updatedb, and xargs</seg>
|
---|
96 | </seglistitem>
|
---|
97 | </segmentedlist>
|
---|
98 |
|
---|
99 | <variablelist>
|
---|
100 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
101 | <?dbfo list-presentation="list"?>
|
---|
102 | <?dbhtml list-presentation="table"?>
|
---|
103 |
|
---|
104 | <varlistentry id="bigram">
|
---|
105 | <term><command>bigram</command></term>
|
---|
106 | <listitem>
|
---|
107 | <para>Was formerly used to produce <command>locate</command>
|
---|
108 | databases</para>
|
---|
109 | <indexterm zone="ch-system-findutils bigram">
|
---|
110 | <primary sortas="b-bigram">bigram</primary>
|
---|
111 | </indexterm>
|
---|
112 | </listitem>
|
---|
113 | </varlistentry>
|
---|
114 |
|
---|
115 | <varlistentry id="code">
|
---|
116 | <term><command>code</command></term>
|
---|
117 | <listitem>
|
---|
118 | <para>Was formerly used to produce <command>locate</command>
|
---|
119 | databases; it is the ancestor of <command>frcode</command>.</para>
|
---|
120 | <indexterm zone="ch-system-findutils code">
|
---|
121 | <primary sortas="b-code">code</primary>
|
---|
122 | </indexterm>
|
---|
123 | </listitem>
|
---|
124 | </varlistentry>
|
---|
125 |
|
---|
126 | <varlistentry id="find">
|
---|
127 | <term><command>find</command></term>
|
---|
128 | <listitem>
|
---|
129 | <para>Searches given directory trees for files matching the specified
|
---|
130 | criteria</para>
|
---|
131 | <indexterm zone="ch-system-findutils find">
|
---|
132 | <primary sortas="b-find">find</primary>
|
---|
133 | </indexterm>
|
---|
134 | </listitem>
|
---|
135 | </varlistentry>
|
---|
136 |
|
---|
137 | <varlistentry id="frcode">
|
---|
138 | <term><command>frcode</command></term>
|
---|
139 | <listitem>
|
---|
140 | <para>Is called by <command>updatedb</command> to compress the list
|
---|
141 | of file names; it uses front-compression, reducing the database size
|
---|
142 | by a factor of four to five.</para>
|
---|
143 | <indexterm zone="ch-system-findutils frcode">
|
---|
144 | <primary sortas="b-frcode">frcode</primary>
|
---|
145 | </indexterm>
|
---|
146 | </listitem>
|
---|
147 | </varlistentry>
|
---|
148 |
|
---|
149 | <varlistentry id="locate">
|
---|
150 | <term><command>locate</command></term>
|
---|
151 | <listitem>
|
---|
152 | <para>Searches through a database of file names and reports the names
|
---|
153 | that contain a given string or match a given pattern</para>
|
---|
154 | <indexterm zone="ch-system-findutils locate">
|
---|
155 | <primary sortas="b-locate">locate</primary>
|
---|
156 | </indexterm>
|
---|
157 | </listitem>
|
---|
158 | </varlistentry>
|
---|
159 |
|
---|
160 | <varlistentry id="updatedb">
|
---|
161 | <term><command>updatedb</command></term>
|
---|
162 | <listitem>
|
---|
163 | <para>Updates the <command>locate</command> database; it scans the
|
---|
164 | entire file system (including other file systems that are currently
|
---|
165 | mounted, unless told not to) and puts every file name it finds into
|
---|
166 | the database</para>
|
---|
167 | <indexterm zone="ch-system-findutils updatedb">
|
---|
168 | <primary sortas="b-updatedb">updatedb</primary>
|
---|
169 | </indexterm>
|
---|
170 | </listitem>
|
---|
171 | </varlistentry>
|
---|
172 |
|
---|
173 | <varlistentry id="xargs">
|
---|
174 | <term><command>xargs</command></term>
|
---|
175 | <listitem>
|
---|
176 | <para>Can be used to apply a given command to a list of files</para>
|
---|
177 | <indexterm zone="ch-system-findutils xargs">
|
---|
178 | <primary sortas="b-xargs">xargs</primary>
|
---|
179 | </indexterm>
|
---|
180 | </listitem>
|
---|
181 | </varlistentry>
|
---|
182 |
|
---|
183 | </variablelist>
|
---|
184 |
|
---|
185 | </sect2>
|
---|
186 |
|
---|
187 | </sect1>
|
---|