1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
6 <sect1 id="ch-system-findutils" xreflabel="Findutils">
7 <title>Findutils-&findutils-version;</title>
8 <?dbhtml filename="findutils.html"?>
10 <indexterm zone="ch-system-findutils"><primary sortas="a-Findutils">Findutils</primary></indexterm>
12 <para>The Findutils package contains programs to find files. Processes
13 are provided to recursively search through a directory tree and to
14 create, maintain and search a database (often faster than the recursive
15 find, but unreliable if the database has not been recently updated).</para>
17 <screen>&buildtime; 0.2 SBU
18 &diskspace; 7.5 MB</screen>
20 <para>Findutils installation depends on: Bash, Binutils, Coreutils,
21 Diffutils, GCC, Gettext, Glibc, Grep, Make, Sed.</para>
26 <title>Installation of Findutils</title>
28 <para>Prepare Findutils for compilation:</para>
30 <screen><userinput>./configure --prefix=/usr --libexecdir=/usr/lib/locate \
31 --localstatedir=/var/lib/misc</userinput></screen>
33 <para>The localstatedir directive above changes the location of the locate
34 database to be in /var/lib/misc, which is FHS-compliant.</para>
36 <para>Compile the package:</para>
38 <screen><userinput>make</userinput></screen>
40 <para>To test the results, issue:
41 <userinput>make check</userinput>.</para>
43 <para>Now install the package:</para>
45 <screen><userinput>make install</userinput></screen>
50 <sect2 id="contents-findutils"><title>Contents of Findutils</title>
52 <para><emphasis>Installed programs</emphasis>: bigram, code, find, frcode,
53 locate, updatedb and xargs</para>
58 <sect2><title>Short descriptions</title>
60 <indexterm zone="ch-system-findutils bigram"><primary sortas="b-bigram">bigram</primary></indexterm>
61 <para id="bigram"><command>bigram</command> was formerly used to produce locate
64 <indexterm zone="ch-system-findutils code"><primary sortas="b-code">code</primary></indexterm>
65 <para id="code"><command>code</command> was formerly used to produce locate
66 databases. It is the ancestor of frcode.</para>
68 <indexterm zone="ch-system-findutils find"><primary sortas="b-find">find</primary></indexterm>
69 <para id="find"><command>find</command> searches given directory trees for files
70 matching the specified criteria.</para>
72 <indexterm zone="ch-system-findutils frcode"><primary sortas="b-frcode">frcode</primary></indexterm>
73 <para id="frcode"><command>frcode</command> is called by updatedb to compress the
74 list of file names. It uses front-compression, reducing the database size by a
75 factor of 4 to 5.</para>
77 <indexterm zone="ch-system-findutils locate"><primary sortas="b-locate">locate</primary></indexterm>
78 <para id="locate"><command>locate</command> searches through a database of file names,
79 and reports the names that contain a given string or match a given pattern.</para>
81 <indexterm zone="ch-system-findutils updatedb"><primary sortas="b-updatedb">updatedb</primary></indexterm>
82 <para id="updatedb"><command>updatedb</command> updates the locate database. It scans
83 the entire file system (including other file systems that are currently mounted,
84 unless told not to) and puts every file name it finds in the database.</para>
86 <indexterm zone="ch-system-findutils xargs"><primary sortas="b-xargs">xargs</primary></indexterm>
87 <para id="xargs"><command>xargs</command> can be used to apply a given command to
88 a list of files.</para>