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