source: clfs-sysroot/BOOK/final-system/common/findutils.xml@ 6ccdfb4

Last change on this file since 6ccdfb4 was cc8d737, checked in by Joe Ciccone <jciccone@…>, 16 years ago

Use cat instead of echo wherever possible.

  • Property mode set to 100644
File size: 6.3 KB
RevLine 
[02095ae]1<?xml version="1.0" encoding="ISO-8859-1"?>
[c439b8a]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[02095ae]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
[f3a1e98]30 <para os="c1">When Cross Compiling the configure script does not
31 run a select few tests, Set the values manually:</para>
32
[cc8d737]33<screen os="c2"><userinput>cat &gt; config.cache &lt;&lt; EOF
34gl_cv_func_wcwidth_works=yes
35gl_cv_header_working_fcntl_h=yes
36ac_cv_func_fnmatch_gnu=yes
37EOF</userinput></screen>
[f3a1e98]38
[02095ae]39 <para os="a">Prepare Findutils for compilation:</para>
40
[cee2ca2]41<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
[f3a1e98]42 --prefix=/usr --cache-file=config.cache \
43 --libexecdir=/usr/lib/locate \
[cee2ca2]44 --localstatedir=/var/lib/locate</userinput></screen>
[02095ae]45
46 <variablelist os="c">
47 <title>The meaning of the configure options:</title>
48
49 <varlistentry>
50 <term><parameter>--localstatedir</parameter></term>
51 <listitem>
52 <para>This option changes the location of the <command>locate</command>
53 database to be in <filename class="directory">/var/lib/locate</filename>,
54 which is FHS-compliant.</para>
55 </listitem>
56 </varlistentry>
57
58 </variablelist>
59
60 <para os="d">Compile the package:</para>
61
62<screen os="e"><userinput>make</userinput></screen>
63
64 <para os="f">Install the package:</para>
65
[586feb7]66<screen os="g"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
[02095ae]67
[14ab808]68 <para os="h">The <command>find</command> program is used by some of the
69 scripts in the CLFS-Bootscripts package. As <filename
[32a0631]70 class="directory">/usr</filename> may not be available during the early
[e460553]71 stages of booting, the <command>find</command> binary needs to be on
[72d4eec]72 the root partition:</para>
[32a0631]73
[9efbbb4]74<screen os="i"><userinput>mv -v ${CLFS}/usr/bin/find ${CLFS}/bin</userinput></screen>
[32a0631]75
[72d4eec]76 <para os="j">The <command>updatedb</command> script needs to be modified
77 to point to the new location for <command>find</command>:</para>
78
79<screen os="k"><userinput>cp ${CLFS}/usr/bin/updatedb{,.orig}
[a074923]80sed 's@find:=${BINDIR}@find:=/bin@' ${CLFS}/usr/bin/updatedb.orig &gt; \
81 ${CLFS}/usr/bin/updatedb
[fc615ed]82rm ${CLFS}/usr/bin/updatedb.orig</userinput></screen>
[72d4eec]83
[02095ae]84 </sect2>
85
86 <sect2 id="contents-findutils" role="content">
87 <title>Contents of Findutils</title>
88
89 <segmentedlist>
90 <segtitle>Installed programs</segtitle>
91
92 <seglistitem>
93 <seg>bigram, code, find, frcode, locate, updatedb, and xargs</seg>
94 </seglistitem>
95 </segmentedlist>
96
97 <variablelist>
98 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
99 <?dbfo list-presentation="list"?>
100 <?dbhtml list-presentation="table"?>
101
102 <varlistentry id="bigram">
103 <term><command>bigram</command></term>
104 <listitem>
105 <para>Was formerly used to produce <command>locate</command>
106 databases</para>
107 <indexterm zone="ch-system-findutils bigram">
108 <primary sortas="b-bigram">bigram</primary>
109 </indexterm>
110 </listitem>
111 </varlistentry>
112
113 <varlistentry id="code">
114 <term><command>code</command></term>
115 <listitem>
116 <para>Was formerly used to produce <command>locate</command>
117 databases; it is the ancestor of <command>frcode</command>.</para>
118 <indexterm zone="ch-system-findutils code">
119 <primary sortas="b-code">code</primary>
120 </indexterm>
121 </listitem>
122 </varlistentry>
123
124 <varlistentry id="find">
125 <term><command>find</command></term>
126 <listitem>
127 <para>Searches given directory trees for files matching the specified
128 criteria</para>
129 <indexterm zone="ch-system-findutils find">
130 <primary sortas="b-find">find</primary>
131 </indexterm>
132 </listitem>
133 </varlistentry>
134
135 <varlistentry id="frcode">
136 <term><command>frcode</command></term>
137 <listitem>
138 <para>Is called by <command>updatedb</command> to compress the list
139 of file names; it uses front-compression, reducing the database size
140 by a factor of four to five.</para>
141 <indexterm zone="ch-system-findutils frcode">
142 <primary sortas="b-frcode">frcode</primary>
143 </indexterm>
144 </listitem>
145 </varlistentry>
146
147 <varlistentry id="locate">
148 <term><command>locate</command></term>
149 <listitem>
150 <para>Searches through a database of file names and reports the names
151 that contain a given string or match a given pattern</para>
152 <indexterm zone="ch-system-findutils locate">
153 <primary sortas="b-locate">locate</primary>
154 </indexterm>
155 </listitem>
156 </varlistentry>
157
158 <varlistentry id="updatedb">
159 <term><command>updatedb</command></term>
160 <listitem>
161 <para>Updates the <command>locate</command> database; it scans the
162 entire file system (including other file systems that are currently
163 mounted, unless told not to) and puts every file name it finds into
164 the database</para>
165 <indexterm zone="ch-system-findutils updatedb">
166 <primary sortas="b-updatedb">updatedb</primary>
167 </indexterm>
168 </listitem>
169 </varlistentry>
170
171 <varlistentry id="xargs">
172 <term><command>xargs</command></term>
173 <listitem>
174 <para>Can be used to apply a given command to a list of files</para>
175 <indexterm zone="ch-system-findutils xargs">
176 <primary sortas="b-xargs">xargs</primary>
177 </indexterm>
178 </listitem>
179 </varlistentry>
180
181 </variablelist>
182
183 </sect2>
184
185</sect1>
Note: See TracBrowser for help on using the repository browser.