2004-05-03 11:59:46 +01:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
|
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
]>
|
2004-01-27 22:29:49 +00:00
|
|
|
<sect1 id="ch-system-findutils" xreflabel="Findutils">
|
2004-05-03 11:59:46 +01:00
|
|
|
<title>Findutils-&findutils-version;</title>
|
|
|
|
<?dbhtml filename="findutils.html"?>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2004-05-03 11:59:46 +01:00
|
|
|
<indexterm zone="ch-system-findutils"><primary sortas="a-Findutils">Findutils</primary></indexterm>
|
2004-01-12 23:23:50 +00:00
|
|
|
|
2004-05-03 11:59:46 +01:00
|
|
|
<para>The Findutils package contains programs to find files. Processes
|
|
|
|
are provided to recursively search through a directory tree and to
|
|
|
|
create, maintain and search a database (often faster than the recursive
|
|
|
|
find, but unreliable if the database has not been recently updated).</para>
|
|
|
|
|
|
|
|
<screen>&buildtime; 0.2 SBU
|
|
|
|
&diskspace; 7.5 MB</screen>
|
|
|
|
|
|
|
|
<para>Findutils installation depends on: Bash, Binutils, Coreutils,
|
|
|
|
Diffutils, GCC, Gettext, Glibc, Grep, Make, Sed.</para>
|
2001-07-17 19:51:18 +01:00
|
|
|
|
2003-11-01 22:31:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
<sect2>
|
2004-01-12 23:24:06 +00:00
|
|
|
<title>Installation of Findutils</title>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
|
|
|
<para>Prepare Findutils for compilation:</para>
|
|
|
|
|
2004-02-28 07:11:44 +00:00
|
|
|
<screen><userinput>./configure --prefix=/usr --libexecdir=/usr/lib/locate \
|
|
|
|
--localstatedir=/var/lib/misc</userinput></screen>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2004-02-28 07:11:44 +00:00
|
|
|
<para>The localstatedir directive above changes the location of the locate
|
|
|
|
database to be in /var/lib/misc, which is FHS-compliant.</para>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
|
|
|
<para>Compile the package:</para>
|
|
|
|
|
|
|
|
<screen><userinput>make</userinput></screen>
|
|
|
|
|
2004-05-03 11:59:46 +01:00
|
|
|
<para>To test the results, issue:
|
2004-02-07 10:48:55 +00:00
|
|
|
<userinput>make check</userinput>.</para>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2004-05-03 11:59:46 +01:00
|
|
|
<para>Now install the package:</para>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
|
|
|
<screen><userinput>make install</userinput></screen>
|
|
|
|
|
|
|
|
</sect2>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2004-01-12 23:23:50 +00:00
|
|
|
|
2004-05-03 11:59:46 +01:00
|
|
|
<sect2 id="contents-findutils"><title>Contents of Findutils</title>
|
|
|
|
|
|
|
|
<para><emphasis>Installed programs</emphasis>: bigram, code, find, frcode,
|
|
|
|
locate, updatedb and xargs</para>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
|
|
|
|
<sect2><title>Short descriptions</title>
|
|
|
|
|
|
|
|
<indexterm zone="ch-system-findutils bigram"><primary sortas="b-bigram">bigram</primary></indexterm>
|
|
|
|
<para id="bigram"><command>bigram</command> was formerly used to produce locate
|
|
|
|
databases.</para>
|
|
|
|
|
|
|
|
<indexterm zone="ch-system-findutils code"><primary sortas="b-code">code</primary></indexterm>
|
|
|
|
<para id="code"><command>code</command> was formerly used to produce locate
|
|
|
|
databases. It is the ancestor of frcode.</para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2004-05-03 11:59:46 +01:00
|
|
|
<indexterm zone="ch-system-findutils find"><primary sortas="b-find">find</primary></indexterm>
|
|
|
|
<para id="find"><command>find</command> searches given directory trees for files
|
|
|
|
matching the specified criteria.</para>
|
|
|
|
|
|
|
|
<indexterm zone="ch-system-findutils frcode"><primary sortas="b-frcode">frcode</primary></indexterm>
|
|
|
|
<para id="frcode"><command>frcode</command> is called by updatedb to compress the
|
|
|
|
list of file names. It uses front-compression, reducing the database size by a
|
|
|
|
factor of 4 to 5.</para>
|
|
|
|
|
|
|
|
<indexterm zone="ch-system-findutils locate"><primary sortas="b-locate">locate</primary></indexterm>
|
|
|
|
<para id="locate"><command>locate</command> searches through a database of file names,
|
|
|
|
and reports the names that contain a given string or match a given pattern.</para>
|
|
|
|
|
|
|
|
<indexterm zone="ch-system-findutils updatedb"><primary sortas="b-updatedb">updatedb</primary></indexterm>
|
|
|
|
<para id="updatedb"><command>updatedb</command> updates the locate database. It scans
|
|
|
|
the entire file system (including other file systems that are currently mounted,
|
|
|
|
unless told not to) and puts every file name it finds in the database.</para>
|
|
|
|
|
|
|
|
<indexterm zone="ch-system-findutils xargs"><primary sortas="b-xargs">xargs</primary></indexterm>
|
|
|
|
<para id="xargs"><command>xargs</command> can be used to apply a given command to
|
|
|
|
a list of files.</para>
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</sect1>
|