Restore comment about possible math failures in glibc
[linux_from_scratch.git] / BOOK / chapter06 / findutils.xml
blob151088d8d341ebcb4ff2cd85203aa0a835a6eb3c
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 ]>
8 <sect1 id="ch-system-findutils" role="wrap">
9   <?dbhtml filename="findutils.html"?>
11   <sect1info condition="script">
12     <productname>findutils</productname>
13     <productnumber>&findutils-version;</productnumber>
14     <address>&findutils-url;</address>
15   </sect1info>
17   <title>Findutils-&findutils-version;</title>
19   <indexterm zone="ch-system-findutils">
20     <primary sortas="a-Findutils">Findutils</primary>
21   </indexterm>
23   <sect2 role="package">
24     <title/>
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>
31     <segmentedlist>
32       <segtitle>&buildtime;</segtitle>
33       <segtitle>&diskspace;</segtitle>
35       <seglistitem>
36         <seg>&findutils-ch6-sbu;</seg>
37         <seg>&findutils-ch6-du;</seg>
38       </seglistitem>
39     </segmentedlist>
41   </sect2>
43   <sect2 role="installation">
44     <title>Installation of Findutils</title>
46    <!-- this has been fixed in upstream gnulib, when a new version of
47    findutils is released, please check #4055 to see if the change has been
48    picked up in this package -->
49    <para>First, suppress a test which on some machines can loop forever:</para>
51 <screen><userinput remap="pre">sed -i 's/test-lock..EXEEXT.//' tests/Makefile.in</userinput></screen>
53     <para>Prepare Findutils for compilation:</para>
55 <screen><userinput remap="configure">./configure --prefix=/usr --localstatedir=/var/lib/locate</userinput></screen>
57     <variablelist>
58       <title>The meaning of the configure options:</title>
60       <varlistentry>
61         <term><parameter>--localstatedir</parameter></term>
62         <listitem>
63           <para>This option changes the location of the <command>locate</command>
64           database to be in <filename class="directory">/var/lib/locate</filename>,
65           which is FHS-compliant.</para>
66         </listitem>
67       </varlistentry>
69     </variablelist>
71     <para>Compile the package:</para>
73 <screen><userinput remap="make">make</userinput></screen>
75     <para>To test the results, issue:</para>
77 <screen><userinput remap="test">make check</userinput></screen>
79     <para>Install the package:</para>
81 <screen><userinput remap="install">make install</userinput></screen>
83     <para revision="sysv">Some of the scripts in the LFS-Bootscripts package
84     depend on <command>find</command>.  As <filename
85     class="directory">/usr</filename> may not be available during the early
86     stages of booting, this program needs to be on the root partition.  The
87     <command>updatedb</command> script also needs to be modified to correct an
88     explicit path:</para>
90     <para revision="systemd"> Some packages in BLFS and beyond expect the
91     <command>find</command> program in <filename
92     class="directory">/bin</filename>, so make sure it's placed there:</para>
94 <screen><userinput remap="install">mv -v /usr/bin/find /bin
95 sed -i 's|find:=${BINDIR}|find:=/bin|' /usr/bin/updatedb</userinput></screen>
97   </sect2>
99   <sect2 id="contents-findutils" role="content">
100     <title>Contents of Findutils</title>
102     <segmentedlist>
103       <segtitle>Installed programs</segtitle>
105       <seglistitem>
106         <seg>code, find, locate, oldfind, updatedb, and xargs</seg>
107       </seglistitem>
108     </segmentedlist>
110     <variablelist>
111       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
112       <?dbfo list-presentation="list"?>
113       <?dbhtml list-presentation="table"?>
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>
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>
137       <varlistentry id="locate">
138         <term><command>locate</command></term>
139         <listitem>
140           <para>Searches through a database of file names and reports the names
141           that contain a given string or match a given pattern</para>
142           <indexterm zone="ch-system-findutils locate">
143             <primary sortas="b-locate">locate</primary>
144           </indexterm>
145         </listitem>
146       </varlistentry>
148       <varlistentry id="oldfind">
149         <term><command>oldfind</command></term>
150         <listitem>
151           <para>Older version of find, using a different algorithm</para>
152           <indexterm zone="ch-system-findutils oldfind">
153             <primary sortas="b-oldfind">oldfind</primary>
154           </indexterm>
155         </listitem>
156       </varlistentry>
158       <varlistentry id="updatedb">
159       <term><command>updatedb</command></term>
160         <listitem>
161           <para>Updates the <command>locate</command> database; it scans the
162           entire file system (including other file systems that are currently
163           mounted, unless told not to) and puts every file name it finds into
164           the database</para>
165           <indexterm zone="ch-system-findutils updatedb">
166             <primary sortas="b-updatedb">updatedb</primary>
167           </indexterm>
168         </listitem>
169       </varlistentry>
171       <varlistentry id="xargs">
172         <term><command>xargs</command></term>
173         <listitem>
174           <para>Can be used to apply a given command to a list of files</para>
175           <indexterm zone="ch-system-findutils xargs">
176             <primary sortas="b-xargs">xargs</primary>
177           </indexterm>
178         </listitem>
179       </varlistentry>
181     </variablelist>
183   </sect2>
185 </sect1>