[02095ae] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/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 | <title>Findutils-&findutils-version;</title>
|
---|
| 12 |
|
---|
| 13 | <indexterm zone="ch-system-findutils">
|
---|
| 14 | <primary sortas="a-Findutils">Findutils</primary>
|
---|
| 15 | </indexterm>
|
---|
| 16 |
|
---|
| 17 | <sect2 role="package">
|
---|
| 18 | <title/>
|
---|
| 19 |
|
---|
| 20 | <para>The Findutils package contains programs to find files. These programs
|
---|
| 21 | are provided to recursively search through a directory tree and to
|
---|
| 22 | create, maintain, and search a database (often faster than the recursive
|
---|
| 23 | find, but unreliable if the database has not been recently updated).</para>
|
---|
| 24 |
|
---|
| 25 | </sect2>
|
---|
| 26 |
|
---|
| 27 | <sect2 role="installation">
|
---|
| 28 | <title>Installation of Findutils</title>
|
---|
| 29 |
|
---|
| 30 | <para os="a">Prepare Findutils for compilation:</para>
|
---|
| 31 |
|
---|
[586feb7] | 32 | <screen os="b"><userinput>./configure --prefix=/usr --host=${CLFS_TARGET} \
|
---|
[02095ae] | 33 | --libexecdir=/usr/lib/locate --localstatedir=/var/lib/locate</userinput></screen>
|
---|
| 34 |
|
---|
| 35 | <variablelist os="c">
|
---|
| 36 | <title>The meaning of the configure options:</title>
|
---|
| 37 |
|
---|
| 38 | <varlistentry>
|
---|
| 39 | <term><parameter>--localstatedir</parameter></term>
|
---|
| 40 | <listitem>
|
---|
| 41 | <para>This option changes the location of the <command>locate</command>
|
---|
| 42 | database to be in <filename class="directory">/var/lib/locate</filename>,
|
---|
| 43 | which is FHS-compliant.</para>
|
---|
| 44 | </listitem>
|
---|
| 45 | </varlistentry>
|
---|
| 46 |
|
---|
| 47 | </variablelist>
|
---|
| 48 |
|
---|
| 49 | <para os="d">Compile the package:</para>
|
---|
| 50 |
|
---|
| 51 | <screen os="e"><userinput>make</userinput></screen>
|
---|
| 52 |
|
---|
| 53 | <para os="f">Install the package:</para>
|
---|
| 54 |
|
---|
[586feb7] | 55 | <screen os="g"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
|
---|
[02095ae] | 56 |
|
---|
[32a0631] | 57 | <para os="h">Find from Findutils is used by some of the scripts
|
---|
| 58 | in the CLFS-Bootscripts package. As <filename
|
---|
| 59 | class="directory">/usr</filename> may not be available during the early
|
---|
| 60 | stages of booting, those binaries need to be on the root partition:</para>
|
---|
| 61 |
|
---|
| 62 | <screen os="i"><userinput>mv -v ${CLFS}/usr/bin/find ${CLFS}/bin/find</userinput></screen>
|
---|
| 63 |
|
---|
[02095ae] | 64 | </sect2>
|
---|
| 65 |
|
---|
| 66 | <sect2 id="contents-findutils" role="content">
|
---|
| 67 | <title>Contents of Findutils</title>
|
---|
| 68 |
|
---|
| 69 | <segmentedlist>
|
---|
| 70 | <segtitle>Installed programs</segtitle>
|
---|
| 71 |
|
---|
| 72 | <seglistitem>
|
---|
| 73 | <seg>bigram, code, find, frcode, locate, updatedb, and xargs</seg>
|
---|
| 74 | </seglistitem>
|
---|
| 75 | </segmentedlist>
|
---|
| 76 |
|
---|
| 77 | <variablelist>
|
---|
| 78 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 79 | <?dbfo list-presentation="list"?>
|
---|
| 80 | <?dbhtml list-presentation="table"?>
|
---|
| 81 |
|
---|
| 82 | <varlistentry id="bigram">
|
---|
| 83 | <term><command>bigram</command></term>
|
---|
| 84 | <listitem>
|
---|
| 85 | <para>Was formerly used to produce <command>locate</command>
|
---|
| 86 | databases</para>
|
---|
| 87 | <indexterm zone="ch-system-findutils bigram">
|
---|
| 88 | <primary sortas="b-bigram">bigram</primary>
|
---|
| 89 | </indexterm>
|
---|
| 90 | </listitem>
|
---|
| 91 | </varlistentry>
|
---|
| 92 |
|
---|
| 93 | <varlistentry id="code">
|
---|
| 94 | <term><command>code</command></term>
|
---|
| 95 | <listitem>
|
---|
| 96 | <para>Was formerly used to produce <command>locate</command>
|
---|
| 97 | databases; it is the ancestor of <command>frcode</command>.</para>
|
---|
| 98 | <indexterm zone="ch-system-findutils code">
|
---|
| 99 | <primary sortas="b-code">code</primary>
|
---|
| 100 | </indexterm>
|
---|
| 101 | </listitem>
|
---|
| 102 | </varlistentry>
|
---|
| 103 |
|
---|
| 104 | <varlistentry id="find">
|
---|
| 105 | <term><command>find</command></term>
|
---|
| 106 | <listitem>
|
---|
| 107 | <para>Searches given directory trees for files matching the specified
|
---|
| 108 | criteria</para>
|
---|
| 109 | <indexterm zone="ch-system-findutils find">
|
---|
| 110 | <primary sortas="b-find">find</primary>
|
---|
| 111 | </indexterm>
|
---|
| 112 | </listitem>
|
---|
| 113 | </varlistentry>
|
---|
| 114 |
|
---|
| 115 | <varlistentry id="frcode">
|
---|
| 116 | <term><command>frcode</command></term>
|
---|
| 117 | <listitem>
|
---|
| 118 | <para>Is called by <command>updatedb</command> to compress the list
|
---|
| 119 | of file names; it uses front-compression, reducing the database size
|
---|
| 120 | by a factor of four to five.</para>
|
---|
| 121 | <indexterm zone="ch-system-findutils frcode">
|
---|
| 122 | <primary sortas="b-frcode">frcode</primary>
|
---|
| 123 | </indexterm>
|
---|
| 124 | </listitem>
|
---|
| 125 | </varlistentry>
|
---|
| 126 |
|
---|
| 127 | <varlistentry id="locate">
|
---|
| 128 | <term><command>locate</command></term>
|
---|
| 129 | <listitem>
|
---|
| 130 | <para>Searches through a database of file names and reports the names
|
---|
| 131 | that contain a given string or match a given pattern</para>
|
---|
| 132 | <indexterm zone="ch-system-findutils locate">
|
---|
| 133 | <primary sortas="b-locate">locate</primary>
|
---|
| 134 | </indexterm>
|
---|
| 135 | </listitem>
|
---|
| 136 | </varlistentry>
|
---|
| 137 |
|
---|
| 138 | <varlistentry id="updatedb">
|
---|
| 139 | <term><command>updatedb</command></term>
|
---|
| 140 | <listitem>
|
---|
| 141 | <para>Updates the <command>locate</command> database; it scans the
|
---|
| 142 | entire file system (including other file systems that are currently
|
---|
| 143 | mounted, unless told not to) and puts every file name it finds into
|
---|
| 144 | the database</para>
|
---|
| 145 | <indexterm zone="ch-system-findutils updatedb">
|
---|
| 146 | <primary sortas="b-updatedb">updatedb</primary>
|
---|
| 147 | </indexterm>
|
---|
| 148 | </listitem>
|
---|
| 149 | </varlistentry>
|
---|
| 150 |
|
---|
| 151 | <varlistentry id="xargs">
|
---|
| 152 | <term><command>xargs</command></term>
|
---|
| 153 | <listitem>
|
---|
| 154 | <para>Can be used to apply a given command to a list of files</para>
|
---|
| 155 | <indexterm zone="ch-system-findutils xargs">
|
---|
| 156 | <primary sortas="b-xargs">xargs</primary>
|
---|
| 157 | </indexterm>
|
---|
| 158 | </listitem>
|
---|
| 159 | </varlistentry>
|
---|
| 160 |
|
---|
| 161 | </variablelist>
|
---|
| 162 |
|
---|
| 163 | </sect2>
|
---|
| 164 |
|
---|
| 165 | </sect1>
|
---|