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