1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.4/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 --prefix=/usr --libexecdir=/usr/lib/locate \
|
---|
33 | --localstatedir=/var/lib/locate</userinput></screen>
|
---|
34 |
|
---|
35 | <variablelist os="c">
|
---|
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 |
|
---|
49 | <para os="d">Compile the package:</para>
|
---|
50 |
|
---|
51 | <screen os="e"><userinput>make</userinput></screen>
|
---|
52 |
|
---|
53 | <para os="f">To test the results, issue:
|
---|
54 | <userinput>make check</userinput>.</para>
|
---|
55 |
|
---|
56 | <para os="g">Install the package:</para>
|
---|
57 |
|
---|
58 | <screen os="h"><userinput>make install</userinput></screen>
|
---|
59 |
|
---|
60 | </sect2>
|
---|
61 |
|
---|
62 | <sect2 id="contents-findutils" role="content">
|
---|
63 | <title>Contents of Findutils</title>
|
---|
64 |
|
---|
65 | <segmentedlist>
|
---|
66 | <segtitle>Installed programs</segtitle>
|
---|
67 |
|
---|
68 | <seglistitem>
|
---|
69 | <seg>bigram, code, find, frcode, locate, updatedb, and xargs</seg>
|
---|
70 | </seglistitem>
|
---|
71 | </segmentedlist>
|
---|
72 |
|
---|
73 | <variablelist>
|
---|
74 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
75 | <?dbfo list-presentation="list"?>
|
---|
76 | <?dbhtml list-presentation="table"?>
|
---|
77 |
|
---|
78 | <varlistentry id="bigram">
|
---|
79 | <term><command>bigram</command></term>
|
---|
80 | <listitem>
|
---|
81 | <para>Was formerly used to produce <command>locate</command>
|
---|
82 | databases</para>
|
---|
83 | <indexterm zone="ch-system-findutils bigram">
|
---|
84 | <primary sortas="b-bigram">bigram</primary>
|
---|
85 | </indexterm>
|
---|
86 | </listitem>
|
---|
87 | </varlistentry>
|
---|
88 |
|
---|
89 | <varlistentry id="code">
|
---|
90 | <term><command>code</command></term>
|
---|
91 | <listitem>
|
---|
92 | <para>Was formerly used to produce <command>locate</command>
|
---|
93 | databases; it is the ancestor of <command>frcode</command>.</para>
|
---|
94 | <indexterm zone="ch-system-findutils code">
|
---|
95 | <primary sortas="b-code">code</primary>
|
---|
96 | </indexterm>
|
---|
97 | </listitem>
|
---|
98 | </varlistentry>
|
---|
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="frcode">
|
---|
112 | <term><command>frcode</command></term>
|
---|
113 | <listitem>
|
---|
114 | <para>Is called by <command>updatedb</command> to compress the list
|
---|
115 | of file names; it uses front-compression, reducing the database size
|
---|
116 | by a factor of four to five.</para>
|
---|
117 | <indexterm zone="ch-system-findutils frcode">
|
---|
118 | <primary sortas="b-frcode">frcode</primary>
|
---|
119 | </indexterm>
|
---|
120 | </listitem>
|
---|
121 | </varlistentry>
|
---|
122 |
|
---|
123 | <varlistentry id="locate">
|
---|
124 | <term><command>locate</command></term>
|
---|
125 | <listitem>
|
---|
126 | <para>Searches through a database of file names and reports the names
|
---|
127 | that contain a given string or match a given pattern</para>
|
---|
128 | <indexterm zone="ch-system-findutils locate">
|
---|
129 | <primary sortas="b-locate">locate</primary>
|
---|
130 | </indexterm>
|
---|
131 | </listitem>
|
---|
132 | </varlistentry>
|
---|
133 |
|
---|
134 | <varlistentry id="updatedb">
|
---|
135 | <term><command>updatedb</command></term>
|
---|
136 | <listitem>
|
---|
137 | <para>Updates the <command>locate</command> database; it scans the
|
---|
138 | entire file system (including other file systems that are currently
|
---|
139 | mounted, unless told not to) and puts every file name it finds into
|
---|
140 | the database</para>
|
---|
141 | <indexterm zone="ch-system-findutils updatedb">
|
---|
142 | <primary sortas="b-updatedb">updatedb</primary>
|
---|
143 | </indexterm>
|
---|
144 | </listitem>
|
---|
145 | </varlistentry>
|
---|
146 |
|
---|
147 | <varlistentry id="xargs">
|
---|
148 | <term><command>xargs</command></term>
|
---|
149 | <listitem>
|
---|
150 | <para>Can be used to apply a given command to a list of files</para>
|
---|
151 | <indexterm zone="ch-system-findutils xargs">
|
---|
152 | <primary sortas="b-xargs">xargs</primary>
|
---|
153 | </indexterm>
|
---|
154 | </listitem>
|
---|
155 | </varlistentry>
|
---|
156 |
|
---|
157 | </variablelist>
|
---|
158 |
|
---|
159 | </sect2>
|
---|
160 |
|
---|
161 | </sect1>
|
---|