1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
3 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
4 | %general-entities;
|
---|
5 | ]>
|
---|
6 | <sect1 id="ch-system-findutils" role="wrap">
|
---|
7 | <title>Findutils-&findutils-version;</title>
|
---|
8 | <?dbhtml filename="findutils.html"?>
|
---|
9 |
|
---|
10 | <indexterm zone="ch-system-findutils"><primary sortas="a-Findutils">Findutils</primary></indexterm>
|
---|
11 |
|
---|
12 | <sect2 role="package"><title/>
|
---|
13 | <para>The Findutils package contains programs to find files. These programs
|
---|
14 | are provided to recursively search through a directory tree and to
|
---|
15 | create, maintain, and search a database (often faster than the recursive
|
---|
16 | find, but unreliable if the database has not been recently updated).</para>
|
---|
17 |
|
---|
18 | <segmentedlist>
|
---|
19 | <segtitle>&buildtime;</segtitle>
|
---|
20 | <segtitle>&diskspace;</segtitle>
|
---|
21 | <seglistitem><seg>0.1 SBU</seg><seg>9.4 MB</seg></seglistitem>
|
---|
22 | </segmentedlist>
|
---|
23 |
|
---|
24 | <segmentedlist>
|
---|
25 | <segtitle>&dependencies;</segtitle>
|
---|
26 | <seglistitem><seg>Bash, Binutils, Coreutils,
|
---|
27 | Diffutils, GCC, Gettext, Glibc, Grep, Make and Sed</seg></seglistitem>
|
---|
28 | </segmentedlist>
|
---|
29 | </sect2>
|
---|
30 |
|
---|
31 | <sect2 role="installation">
|
---|
32 | <title>Installation of Findutils</title>
|
---|
33 |
|
---|
34 | <para>Prepare Findutils for compilation:</para>
|
---|
35 |
|
---|
36 | <screen><userinput>./configure --prefix=/usr --libexecdir=/usr/lib/locate \
|
---|
37 | --localstatedir=/var/lib/locate</userinput></screen>
|
---|
38 |
|
---|
39 | <para>The <parameter>localstatedir</parameter> option above changes the
|
---|
40 | location of the <command>locate</command> database to be in <filename
|
---|
41 | class="directory">/var/lib/locate</filename>, which is FHS-compliant.</para>
|
---|
42 |
|
---|
43 | <para>Compile the package:</para>
|
---|
44 |
|
---|
45 | <screen><userinput>make</userinput></screen>
|
---|
46 |
|
---|
47 | <para>To test the results, issue:
|
---|
48 | <userinput>make check</userinput>.</para>
|
---|
49 |
|
---|
50 | <para>Install the package:</para>
|
---|
51 |
|
---|
52 | <screen><userinput>make install</userinput></screen>
|
---|
53 |
|
---|
54 | </sect2>
|
---|
55 |
|
---|
56 | <sect2 id="contents-findutils" role="content"><title>Contents of Findutils</title>
|
---|
57 |
|
---|
58 | <segmentedlist>
|
---|
59 | <segtitle>Installed programs</segtitle>
|
---|
60 | <seglistitem><seg>bigram, code, find, frcode, locate, updatedb, and xargs</seg></seglistitem>
|
---|
61 | </segmentedlist>
|
---|
62 |
|
---|
63 | <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
64 | <?dbfo list-presentation="list"?>
|
---|
65 | <?dbhtml list-presentation="table"?>
|
---|
66 |
|
---|
67 | <varlistentry id="bigram">
|
---|
68 | <term><command>bigram</command></term>
|
---|
69 | <listitem>
|
---|
70 | <para>Was formerly used to produce <command>locate</command> databases</para>
|
---|
71 | <indexterm zone="ch-system-findutils bigram"><primary sortas="b-bigram">bigram</primary></indexterm>
|
---|
72 | </listitem>
|
---|
73 | </varlistentry>
|
---|
74 |
|
---|
75 | <varlistentry id="code">
|
---|
76 | <term><command>code</command></term>
|
---|
77 | <listitem>
|
---|
78 | <para>Was formerly used to produce <command>locate</command>
|
---|
79 | databases; it is the ancestor of <command>frcode</command>.</para>
|
---|
80 | <indexterm zone="ch-system-findutils code"><primary sortas="b-code">code</primary></indexterm>
|
---|
81 | </listitem>
|
---|
82 | </varlistentry>
|
---|
83 |
|
---|
84 | <varlistentry id="find">
|
---|
85 | <term><command>find</command></term>
|
---|
86 | <listitem>
|
---|
87 | <para>Searches given directory trees for files matching the specified criteria</para>
|
---|
88 | <indexterm zone="ch-system-findutils find"><primary sortas="b-find">find</primary></indexterm>
|
---|
89 | </listitem>
|
---|
90 | </varlistentry>
|
---|
91 |
|
---|
92 | <varlistentry id="frcode">
|
---|
93 | <term><command>frcode</command></term>
|
---|
94 | <listitem>
|
---|
95 | <para>Is called by <command>updatedb</command> to compress the list of file names; it uses
|
---|
96 | front-compression, reducing the database size by a factor of four to
|
---|
97 | five.</para>
|
---|
98 | <indexterm zone="ch-system-findutils frcode"><primary sortas="b-frcode">frcode</primary></indexterm>
|
---|
99 | </listitem>
|
---|
100 | </varlistentry>
|
---|
101 |
|
---|
102 | <varlistentry id="locate">
|
---|
103 | <term><command>locate</command></term>
|
---|
104 | <listitem>
|
---|
105 | <para>Searches through a database of file names and reports the names
|
---|
106 | that contain a given string or match a given pattern</para>
|
---|
107 | <indexterm zone="ch-system-findutils locate"><primary sortas="b-locate">locate</primary></indexterm>
|
---|
108 | </listitem>
|
---|
109 | </varlistentry>
|
---|
110 |
|
---|
111 | <varlistentry id="updatedb">
|
---|
112 | <term><command>updatedb</command></term>
|
---|
113 | <listitem>
|
---|
114 | <para>Updates the <command>locate</command> database; it scans
|
---|
115 | the entire file system (including other file systems that are currently mounted,
|
---|
116 | unless told not to) and puts every file name it finds into the database</para>
|
---|
117 | <indexterm zone="ch-system-findutils updatedb"><primary sortas="b-updatedb">updatedb</primary></indexterm>
|
---|
118 | </listitem>
|
---|
119 | </varlistentry>
|
---|
120 |
|
---|
121 | <varlistentry id="xargs">
|
---|
122 | <term><command>xargs</command></term>
|
---|
123 | <listitem>
|
---|
124 | <para>Can be used to apply a given command to a list of files</para>
|
---|
125 | <indexterm zone="ch-system-findutils xargs"><primary sortas="b-xargs">xargs</primary></indexterm>
|
---|
126 | </listitem>
|
---|
127 | </varlistentry>
|
---|
128 | </variablelist>
|
---|
129 |
|
---|
130 | </sect2>
|
---|
131 |
|
---|
132 | </sect1>
|
---|
133 |
|
---|