source: BOOK/final-system/common/findutils.xml@ 6acd991

clfs-3.0.0-systemd systemd
Last change on this file since 6acd991 was 686839b, checked in by William Harrington <kb0iic@…>, 11 years ago

Add screen tags around userinput test commands and remap userinput for test commands as remap="test".

  • Property mode set to 100644
File size: 6.3 KB
RevLine 
[3f8be484]1<?xml version="1.0" encoding="ISO-8859-1"?>
[aa18ac0]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[3f8be484]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
[686839b]53 <para os="f">To test the results, issue:</para>
54
55<screen os="f2"><userinput remap="test">make check</userinput></screen>
[3f8be484]56
[e0e40d3]57 <para os="g">Install the package:</para>
[3f8be484]58
[e0e40d3]59<screen os="h"><userinput>make install</userinput></screen>
[3f8be484]60
[040521bc]61 <para os="i">The <command>find</command> program is used by some of the scripts
[e990cbd9]62 in the CLFS-Bootscripts package. As <filename
63 class="directory">/usr</filename> may not be available during the early
[807f5e5]64 stages of booting, the <command>find</command> binary needs to be on
65 the root partition:</para>
[e990cbd9]66
[fcdaf47]67<screen os="j"><userinput>mv -v /usr/bin/find /bin</userinput></screen>
[e990cbd9]68
[807f5e5]69 <para os="k">The <command>updatedb</command> script needs to be modified
70 to point to the new location for <command>find</command>:</para>
71
72<screen os="l"><userinput>sed -i 's@find:=${BINDIR}@find:=/bin@' /usr/bin/updatedb</userinput></screen>
73
[3f8be484]74 </sect2>
75
76 <sect2 id="contents-findutils" role="content">
77 <title>Contents of Findutils</title>
78
79 <segmentedlist>
80 <segtitle>Installed programs</segtitle>
[61ad0b7f]81 <segtitle>Installed directory</segtitle>
[3f8be484]82
83 <seglistitem>
[427015f]84 <seg>bigram, code, find, frcode, locate, oldfind, updatedb, and xargs</seg>
[61ad0b7f]85 <seg>/usr/lib/locate</seg>
[3f8be484]86 </seglistitem>
87 </segmentedlist>
88
89 <variablelist>
90 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
91 <?dbfo list-presentation="list"?>
92 <?dbhtml list-presentation="table"?>
93
94 <varlistentry id="bigram">
95 <term><command>bigram</command></term>
96 <listitem>
97 <para>Was formerly used to produce <command>locate</command>
98 databases</para>
99 <indexterm zone="ch-system-findutils bigram">
100 <primary sortas="b-bigram">bigram</primary>
101 </indexterm>
102 </listitem>
103 </varlistentry>
104
105 <varlistentry id="code">
106 <term><command>code</command></term>
107 <listitem>
108 <para>Was formerly used to produce <command>locate</command>
109 databases; it is the ancestor of <command>frcode</command>.</para>
110 <indexterm zone="ch-system-findutils code">
111 <primary sortas="b-code">code</primary>
112 </indexterm>
113 </listitem>
114 </varlistentry>
115
116 <varlistentry id="find">
117 <term><command>find</command></term>
118 <listitem>
119 <para>Searches given directory trees for files matching the specified
120 criteria</para>
121 <indexterm zone="ch-system-findutils find">
122 <primary sortas="b-find">find</primary>
123 </indexterm>
124 </listitem>
125 </varlistentry>
126
127 <varlistentry id="frcode">
128 <term><command>frcode</command></term>
129 <listitem>
130 <para>Is called by <command>updatedb</command> to compress the list
131 of file names; it uses front-compression, reducing the database size
132 by a factor of four to five.</para>
133 <indexterm zone="ch-system-findutils frcode">
134 <primary sortas="b-frcode">frcode</primary>
135 </indexterm>
136 </listitem>
137 </varlistentry>
138
139 <varlistentry id="locate">
140 <term><command>locate</command></term>
141 <listitem>
142 <para>Searches through a database of file names and reports the names
143 that contain a given string or match a given pattern</para>
144 <indexterm zone="ch-system-findutils locate">
145 <primary sortas="b-locate">locate</primary>
146 </indexterm>
147 </listitem>
148 </varlistentry>
149
[427015f]150 <varlistentry id="oldfind">
151 <term><command>oldfind</command></term>
152 <listitem>
[653cf49]153 <para>Older version of find, using a different algorithm</para>
[427015f]154 <indexterm zone="ch-system-findutils oldfind">
155 <primary sortas="b-oldfind">oldfind</primary>
156 </indexterm>
157 </listitem>
158 </varlistentry>
159
[3f8be484]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.