[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 |
|
---|
[0445a3d] | 48 | <screen><userinput remap="configure">./configure --prefix=/usr --libexecdir=/usr/lib/findutils \
|
---|
[6199f2c] | 49 | --localstatedir=/var/lib/locate</userinput></screen>
|
---|
[73aedd1d] | 50 |
|
---|
[54e422c1] | 51 | <variablelist>
|
---|
| 52 | <title>The meaning of the configure options:</title>
|
---|
[06948c1] | 53 |
|
---|
[54e422c1] | 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>
|
---|
[81fd230] | 62 |
|
---|
[54e422c1] | 63 | </variablelist>
|
---|
| 64 |
|
---|
| 65 | <para>Compile the package:</para>
|
---|
[73aedd1d] | 66 |
|
---|
[0445a3d] | 67 | <screen><userinput remap="make">make</userinput></screen>
|
---|
[73aedd1d] | 68 |
|
---|
[0445a3d] | 69 | <para>To test the results, issue:</para>
|
---|
| 70 |
|
---|
| 71 | <screen><userinput remap="test">make check</userinput></screen>
|
---|
[73aedd1d] | 72 |
|
---|
[54e422c1] | 73 | <para>Install the package:</para>
|
---|
[73aedd1d] | 74 |
|
---|
[0445a3d] | 75 | <screen><userinput remap="install">make install</userinput></screen>
|
---|
[73aedd1d] | 76 |
|
---|
[b540268] | 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
|
---|
[491d4629] | 80 | needs to be on the root partition. The <command>updatedb</command>
|
---|
[e1060de] | 81 | script also needs to be modified to correct an explicit path:</para>
|
---|
[b540268] | 82 |
|
---|
[0445a3d] | 83 | <screen><userinput remap="install">mv -v /usr/bin/find /bin
|
---|
[32e5e2f] | 84 | sed -i -e 's/find:=${BINDIR}/find:=\/bin/' /usr/bin/updatedb</userinput></screen>
|
---|
[e1060de] | 85 |
|
---|
[54e422c1] | 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>
|
---|
[673b0d8] | 186 |
|
---|
| 187 | </sect1>
|
---|