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

Last change on this file since 7ef1b20 was a074923, checked in by Manuel Canales Esparcia <manuel@…>, 17 years ago

Some fixes for PDF look.

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