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

Last change on this file since d000c53 was 12e6567, checked in by Joe Ciccone <jciccone@…>, 16 years ago

Added a sysroot wrapper.
Updated the build variables section of the book, each package uses its own.

  • Property mode set to 100644
File size: 6.3 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/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 &env-target;
28
29 <sect2 role="installation">
30 <title>Installation of Findutils</title>
31
32 <para os="c1">When Cross Compiling the configure script does not
33 run a select few tests, Set the values manually:</para>
34
35<screen os="c2"><userinput>cat &gt; config.cache &lt;&lt; EOF
36gl_cv_func_wcwidth_works=yes
37gl_cv_header_working_fcntl_h=yes
38ac_cv_func_fnmatch_gnu=yes
39EOF</userinput></screen>
40
41 <para os="a">Prepare Findutils for compilation:</para>
42
43<screen os="b"><userinput>./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
44 --prefix=/usr --cache-file=config.cache \
45 --libexecdir=/usr/lib/locate \
46 --localstatedir=/var/lib/locate</userinput></screen>
47
48 <variablelist os="c">
49 <title>The meaning of the configure options:</title>
50
51 <varlistentry>
52 <term><parameter>--localstatedir</parameter></term>
53 <listitem>
54 <para>This option changes the location of the <command>locate</command>
55 database to be in <filename class="directory">/var/lib/locate</filename>,
56 which is FHS-compliant.</para>
57 </listitem>
58 </varlistentry>
59
60 </variablelist>
61
62 <para os="d">Compile the package:</para>
63
64<screen os="e"><userinput>make</userinput></screen>
65
66 <para os="f">Install the package:</para>
67
68<screen os="g"><userinput>make DESTDIR=${CLFS} install</userinput></screen>
69
70 <para os="h">The <command>find</command> program is used by some of the
71 scripts in the CLFS-Bootscripts package. As <filename
72 class="directory">/usr</filename> may not be available during the early
73 stages of booting, the <command>find</command> binary needs to be on
74 the root partition:</para>
75
76<screen os="i"><userinput>mv -v ${CLFS}/usr/bin/find ${CLFS}/bin</userinput></screen>
77
78 <para os="j">The <command>updatedb</command> script needs to be modified
79 to point to the new location for <command>find</command>:</para>
80
81<screen os="k"><userinput>cp ${CLFS}/usr/bin/updatedb{,.orig}
82sed 's@find:=${BINDIR}@find:=/bin@' ${CLFS}/usr/bin/updatedb.orig &gt; \
83 ${CLFS}/usr/bin/updatedb
84rm ${CLFS}/usr/bin/updatedb.orig</userinput></screen>
85
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>
186
187</sect1>
Note: See TracBrowser for help on using the repository browser.