[3f8be484] | 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 |
|
---|
[e0e40d3] | 32 | <screen os="b"><userinput>./configure --prefix=/usr --libexecdir=/usr/lib/locate \
|
---|
[3f8be484] | 33 | --localstatedir=/var/lib/locate</userinput></screen>
|
---|
| 34 |
|
---|
[e0e40d3] | 35 | <variablelist os="c">
|
---|
[3f8be484] | 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 |
|
---|
[e0e40d3] | 49 | <para os="d">Compile the package:</para>
|
---|
[3f8be484] | 50 |
|
---|
[e0e40d3] | 51 | <screen os="e"><userinput>make</userinput></screen>
|
---|
[3f8be484] | 52 |
|
---|
[e0e40d3] | 53 | <para os="f">To test the results, issue:
|
---|
[3f8be484] | 54 | <userinput>make check</userinput>.</para>
|
---|
| 55 |
|
---|
[e0e40d3] | 56 | <para os="g">Install the package:</para>
|
---|
[3f8be484] | 57 |
|
---|
[e0e40d3] | 58 | <screen os="h"><userinput>make install</userinput></screen>
|
---|
[3f8be484] | 59 |
|
---|
[0fe1203] | 60 | <para os="i">Find from Findutils is used by some of the scripts
|
---|
[e990cbd9] | 61 | in the CLFS-Bootscripts package. As <filename
|
---|
| 62 | class="directory">/usr</filename> may not be available during the early
|
---|
| 63 | stages of booting, those binaries need to be on the root partition:</para>
|
---|
| 64 |
|
---|
| 65 | <screen os="j"><userinput>mv -v /usr/bin/find /bin/find</userinput></screen>
|
---|
| 66 |
|
---|
[3f8be484] | 67 | </sect2>
|
---|
| 68 |
|
---|
| 69 | <sect2 id="contents-findutils" role="content">
|
---|
| 70 | <title>Contents of Findutils</title>
|
---|
| 71 |
|
---|
| 72 | <segmentedlist>
|
---|
| 73 | <segtitle>Installed programs</segtitle>
|
---|
| 74 |
|
---|
| 75 | <seglistitem>
|
---|
| 76 | <seg>bigram, code, find, frcode, locate, updatedb, and xargs</seg>
|
---|
| 77 | </seglistitem>
|
---|
| 78 | </segmentedlist>
|
---|
| 79 |
|
---|
| 80 | <variablelist>
|
---|
| 81 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 82 | <?dbfo list-presentation="list"?>
|
---|
| 83 | <?dbhtml list-presentation="table"?>
|
---|
| 84 |
|
---|
| 85 | <varlistentry id="bigram">
|
---|
| 86 | <term><command>bigram</command></term>
|
---|
| 87 | <listitem>
|
---|
| 88 | <para>Was formerly used to produce <command>locate</command>
|
---|
| 89 | databases</para>
|
---|
| 90 | <indexterm zone="ch-system-findutils bigram">
|
---|
| 91 | <primary sortas="b-bigram">bigram</primary>
|
---|
| 92 | </indexterm>
|
---|
| 93 | </listitem>
|
---|
| 94 | </varlistentry>
|
---|
| 95 |
|
---|
| 96 | <varlistentry id="code">
|
---|
| 97 | <term><command>code</command></term>
|
---|
| 98 | <listitem>
|
---|
| 99 | <para>Was formerly used to produce <command>locate</command>
|
---|
| 100 | databases; it is the ancestor of <command>frcode</command>.</para>
|
---|
| 101 | <indexterm zone="ch-system-findutils code">
|
---|
| 102 | <primary sortas="b-code">code</primary>
|
---|
| 103 | </indexterm>
|
---|
| 104 | </listitem>
|
---|
| 105 | </varlistentry>
|
---|
| 106 |
|
---|
| 107 | <varlistentry id="find">
|
---|
| 108 | <term><command>find</command></term>
|
---|
| 109 | <listitem>
|
---|
| 110 | <para>Searches given directory trees for files matching the specified
|
---|
| 111 | criteria</para>
|
---|
| 112 | <indexterm zone="ch-system-findutils find">
|
---|
| 113 | <primary sortas="b-find">find</primary>
|
---|
| 114 | </indexterm>
|
---|
| 115 | </listitem>
|
---|
| 116 | </varlistentry>
|
---|
| 117 |
|
---|
| 118 | <varlistentry id="frcode">
|
---|
| 119 | <term><command>frcode</command></term>
|
---|
| 120 | <listitem>
|
---|
| 121 | <para>Is called by <command>updatedb</command> to compress the list
|
---|
| 122 | of file names; it uses front-compression, reducing the database size
|
---|
| 123 | by a factor of four to five.</para>
|
---|
| 124 | <indexterm zone="ch-system-findutils frcode">
|
---|
| 125 | <primary sortas="b-frcode">frcode</primary>
|
---|
| 126 | </indexterm>
|
---|
| 127 | </listitem>
|
---|
| 128 | </varlistentry>
|
---|
| 129 |
|
---|
| 130 | <varlistentry id="locate">
|
---|
| 131 | <term><command>locate</command></term>
|
---|
| 132 | <listitem>
|
---|
| 133 | <para>Searches through a database of file names and reports the names
|
---|
| 134 | that contain a given string or match a given pattern</para>
|
---|
| 135 | <indexterm zone="ch-system-findutils locate">
|
---|
| 136 | <primary sortas="b-locate">locate</primary>
|
---|
| 137 | </indexterm>
|
---|
| 138 | </listitem>
|
---|
| 139 | </varlistentry>
|
---|
| 140 |
|
---|
| 141 | <varlistentry id="updatedb">
|
---|
| 142 | <term><command>updatedb</command></term>
|
---|
| 143 | <listitem>
|
---|
| 144 | <para>Updates the <command>locate</command> database; it scans the
|
---|
| 145 | entire file system (including other file systems that are currently
|
---|
| 146 | mounted, unless told not to) and puts every file name it finds into
|
---|
| 147 | the database</para>
|
---|
| 148 | <indexterm zone="ch-system-findutils updatedb">
|
---|
| 149 | <primary sortas="b-updatedb">updatedb</primary>
|
---|
| 150 | </indexterm>
|
---|
| 151 | </listitem>
|
---|
| 152 | </varlistentry>
|
---|
| 153 |
|
---|
| 154 | <varlistentry id="xargs">
|
---|
| 155 | <term><command>xargs</command></term>
|
---|
| 156 | <listitem>
|
---|
| 157 | <para>Can be used to apply a given command to a list of files</para>
|
---|
| 158 | <indexterm zone="ch-system-findutils xargs">
|
---|
| 159 | <primary sortas="b-xargs">xargs</primary>
|
---|
| 160 | </indexterm>
|
---|
| 161 | </listitem>
|
---|
| 162 | </varlistentry>
|
---|
| 163 |
|
---|
| 164 | </variablelist>
|
---|
| 165 |
|
---|
| 166 | </sect2>
|
---|
| 167 |
|
---|
| 168 | </sect1>
|
---|