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">
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>
17 <title>Findutils-&findutils-version;</title>
19 <indexterm zone="ch-system-findutils">
20 <primary sortas="a-Findutils">Findutils</primary>
23 <sect2 role="package">
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>
32 <segtitle>&buildtime;</segtitle>
33 <segtitle>&diskspace;</segtitle>
36 <seg>&findutils-ch6-sbu;</seg>
37 <seg>&findutils-ch6-du;</seg>
43 <sect2 role="installation">
44 <title>Installation of Findutils</title>
46 <para>Prepare Findutils for compilation:</para>
48 <screen><userinput remap="configure">./configure --prefix=/usr --localstatedir=/var/lib/locate</userinput></screen>
51 <title>The meaning of the configure options:</title>
54 <term><parameter>--localstatedir</parameter></term>
56 <para>This option changes the location of the <command>locate</command>
57 database to be in <filename class="directory">/var/lib/locate</filename>,
58 which is FHS-compliant.</para>
64 <para>Compile the package:</para>
66 <screen><userinput remap="make">make</userinput></screen>
68 <para>To test the results, issue:</para>
70 <screen><userinput remap="test">make check</userinput></screen>
72 <para>Install the package:</para>
74 <screen><userinput remap="install">make install</userinput></screen>
76 <para>Some packages in BLFS and beyond expect the
77 <command>find</command> program in <filename
78 class="directory">/bin</filename>, so make sure
79 it's placed there:</para>
81 <screen><userinput remap="install">mv -v /usr/bin/find /bin
82 sed -i 's|find:=${BINDIR}|find:=/bin|' /usr/bin/updatedb</userinput></screen>
86 <sect2 id="contents-findutils" role="content">
87 <title>Contents of Findutils</title>
90 <segtitle>Installed programs</segtitle>
93 <seg>code, find, locate, oldfind, updatedb, and xargs</seg>
98 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
99 <?dbfo list-presentation="list"?>
100 <?dbhtml list-presentation="table"?>
102 <varlistentry id="code">
103 <term><command>code</command></term>
105 <para>Was formerly used to produce <command>locate</command>
106 databases; it is the ancestor of <command>frcode</command></para>
107 <indexterm zone="ch-system-findutils code">
108 <primary sortas="b-code">code</primary>
113 <varlistentry id="find">
114 <term><command>find</command></term>
116 <para>Searches given directory trees for files matching the specified
118 <indexterm zone="ch-system-findutils find">
119 <primary sortas="b-find">find</primary>
124 <varlistentry id="locate">
125 <term><command>locate</command></term>
127 <para>Searches through a database of file names and reports the names
128 that contain a given string or match a given pattern</para>
129 <indexterm zone="ch-system-findutils locate">
130 <primary sortas="b-locate">locate</primary>
135 <varlistentry id="oldfind">
136 <term><command>oldfind</command></term>
138 <para>Older version of find, using a different algorithm</para>
139 <indexterm zone="ch-system-findutils oldfind">
140 <primary sortas="b-oldfind">oldfind</primary>
145 <varlistentry id="updatedb">
146 <term><command>updatedb</command></term>
148 <para>Updates the <command>locate</command> database; it scans the
149 entire file system (including other file systems that are currently
150 mounted, unless told not to) and puts every file name it finds into
152 <indexterm zone="ch-system-findutils updatedb">
153 <primary sortas="b-updatedb">updatedb</primary>
158 <varlistentry id="xargs">
159 <term><command>xargs</command></term>
161 <para>Can be used to apply a given command to a list of files</para>
162 <indexterm zone="ch-system-findutils xargs">
163 <primary sortas="b-xargs">xargs</primary>