source: chapter08/findutils.xml@ 1b61cd1

xry111/arm64 xry111/arm64-12.0
Last change on this file since 1b61cd1 was d270248, checked in by Xi Ruoyao <xry111@…>, 18 months ago

Merge remote-tracking branch 'origin/trunk' into xry111/arm64

  • Property mode set to 100644
File size: 4.6 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 <sect1info condition="script">
12 <productname>findutils</productname>
13 <productnumber>&findutils-version;</productnumber>
14 <address>&findutils-url;</address>
15 </sect1info>
16
17 <title>Findutils-&findutils-version;</title>
18
19 <indexterm zone="ch-system-findutils">
20 <primary sortas="a-Findutils">Findutils</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
25
26 <para>The Findutils package contains programs to find files. Programs
27 are provided to search through all the files in a directory tree and to
28 create, maintain, and search a database (often faster than the recursive
29 find, but unreliable unless the database has been updated recently).
30 Findutils also supplies the <command>xargs</command> program, which
31 can be used to run a specified command on each file selected by a search.</para>
32
33 <segmentedlist>
34 <segtitle>&buildtime;</segtitle>
35 <segtitle>&diskspace;</segtitle>
36
37 <seglistitem>
38 <seg>&findutils-fin-sbu;</seg>
39 <seg>&findutils-fin-du;</seg>
40 </seglistitem>
41 </segmentedlist>
42
43 </sect2>
44
45 <sect2 role="installation">
46 <title>Installation of Findutils</title>
47
48 <para>Prepare Findutils for compilation:</para>
49
50<screen><userinput remap="configure">./configure --prefix=/usr --localstatedir=/var/lib/locate</userinput></screen>
51
52 <variablelist>
53 <title>The meaning of the configure options:</title>
54
55 <varlistentry>
56 <term><parameter>--localstatedir</parameter></term>
57 <listitem>
58 <para>This option moves the <command>locate</command>
59 database to <filename class="directory">/var/lib/locate</filename>,
60 which is the FHS-compliant location.</para>
61 </listitem>
62 </varlistentry>
63
64 </variablelist>
65
66 <para>Compile the package:</para>
67
68<screen><userinput remap="make">make</userinput></screen>
69
70 <para>To test the results, issue:</para>
71
72<screen><userinput remap="test">chown -Rv tester .
73su tester -c "PATH=$PATH make check"</userinput></screen>
74
75 <para>Install the package:</para>
76
77<screen><userinput remap="install">make install</userinput></screen>
78
79 </sect2>
80
81 <sect2 id="contents-findutils" role="content">
82 <title>Contents of Findutils</title>
83
84 <segmentedlist>
85 <segtitle>Installed programs</segtitle>
86 <segtitle>Installed directory</segtitle>
87
88 <seglistitem>
89 <seg>find, locate, updatedb, and xargs</seg>
90 <seg>/var/lib/locate</seg>
91 </seglistitem>
92
93 </segmentedlist>
94
95 <variablelist>
96 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
97 <?dbfo list-presentation="list"?>
98 <?dbhtml list-presentation="table"?>
99
100 <varlistentry id="find">
101 <term><command>find</command></term>
102 <listitem>
103 <para>Searches given directory trees for files matching the specified
104 criteria</para>
105 <indexterm zone="ch-system-findutils find">
106 <primary sortas="b-find">find</primary>
107 </indexterm>
108 </listitem>
109 </varlistentry>
110
111 <varlistentry id="locate">
112 <term><command>locate</command></term>
113 <listitem>
114 <para>Searches through a database of file names and reports the names
115 that contain a given string or match a given pattern</para>
116 <indexterm zone="ch-system-findutils locate">
117 <primary sortas="b-locate">locate</primary>
118 </indexterm>
119 </listitem>
120 </varlistentry>
121
122 <varlistentry id="updatedb">
123 <term><command>updatedb</command></term>
124 <listitem>
125 <para>Updates the <command>locate</command> database; it scans the
126 entire file system (including other file systems that are currently
127 mounted, unless told not to) and puts every file name it finds into
128 the database</para>
129 <indexterm zone="ch-system-findutils updatedb">
130 <primary sortas="b-updatedb">updatedb</primary>
131 </indexterm>
132 </listitem>
133 </varlistentry>
134
135 <varlistentry id="xargs">
136 <term><command>xargs</command></term>
137 <listitem>
138 <para>Can be used to apply a given command to a list of files</para>
139 <indexterm zone="ch-system-findutils xargs">
140 <primary sortas="b-xargs">xargs</primary>
141 </indexterm>
142 </listitem>
143 </varlistentry>
144
145 </variablelist>
146
147 </sect2>
148
149</sect1>
Note: See TracBrowser for help on using the repository browser.