2004-05-03 11:59:46 +01:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2007-03-21 18:42:58 +00:00
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
2004-05-03 11:59:46 +01:00
|
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
]>
|
2006-02-03 20:54:03 +00:00
|
|
|
|
2005-02-19 22:16:42 +00:00
|
|
|
<sect1 id="ch-system-findutils" role="wrap">
|
2006-02-03 20:54:03 +00:00
|
|
|
<?dbhtml filename="findutils.html"?>
|
|
|
|
|
2007-09-07 20:16:43 +01:00
|
|
|
<sect1info condition="script">
|
|
|
|
<productname>findutils</productname>
|
|
|
|
<productnumber>&findutils-version;</productnumber>
|
|
|
|
<address>&findutils-url;</address>
|
|
|
|
</sect1info>
|
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
<title>Findutils-&findutils-version;</title>
|
|
|
|
|
|
|
|
<indexterm zone="ch-system-findutils">
|
|
|
|
<primary sortas="a-Findutils">Findutils</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
|
|
|
<title/>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
<para>The Findutils package contains programs to find files. These programs
|
|
|
|
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>
|
2004-01-12 23:23:50 +00:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>&buildtime;</segtitle>
|
|
|
|
<segtitle>&diskspace;</segtitle>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
<seglistitem>
|
2006-05-14 21:16:56 +01:00
|
|
|
<seg>&findutils-ch6-sbu;</seg>
|
|
|
|
<seg>&findutils-ch6-du;</seg>
|
2006-02-03 20:54:03 +00:00
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of Findutils</title>
|
|
|
|
|
|
|
|
<para>Prepare Findutils for compilation:</para>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2014-02-18 07:16:55 +00:00
|
|
|
<screen><userinput remap="configure">./configure --prefix=/usr --localstatedir=/var/lib/locate</userinput></screen>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
<variablelist>
|
|
|
|
<title>The meaning of the configure options:</title>
|
2005-08-12 21:03:48 +01:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
<varlistentry>
|
|
|
|
<term><parameter>--localstatedir</parameter></term>
|
|
|
|
<listitem>
|
|
|
|
<para>This option changes the location of the <command>locate</command>
|
|
|
|
database to be in <filename class="directory">/var/lib/locate</filename>,
|
|
|
|
which is FHS-compliant.</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2005-02-19 22:16:42 +00:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
<para>Compile the package:</para>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2007-09-18 22:11:00 +01:00
|
|
|
<screen><userinput remap="make">make</userinput></screen>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2007-09-18 22:11:00 +01:00
|
|
|
<para>To test the results, issue:</para>
|
|
|
|
|
2020-05-30 19:22:47 +01:00
|
|
|
<screen><userinput remap="test">chown -Rv tester .
|
|
|
|
su tester -c "PATH=$PATH make check"</userinput></screen>
|
2020-01-23 22:49:07 +00:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
<para>Install the package:</para>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2007-09-18 22:11:00 +01:00
|
|
|
<screen><userinput remap="install">make install</userinput></screen>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2016-05-24 22:24:59 +01:00
|
|
|
<para revision="sysv">Some of the scripts in the LFS-Bootscripts package
|
|
|
|
depend on <command>find</command>. As <filename
|
|
|
|
class="directory">/usr</filename> may not be available during the early
|
|
|
|
stages of booting, this program needs to be on the root partition. The
|
|
|
|
<command>updatedb</command> script also needs to be modified to correct an
|
|
|
|
explicit path:</para>
|
|
|
|
|
|
|
|
<para revision="systemd"> Some packages in BLFS and beyond expect the
|
|
|
|
<command>find</command> program in <filename
|
|
|
|
class="directory">/bin</filename>, so make sure it's placed there:</para>
|
2006-07-13 16:28:35 +01:00
|
|
|
|
2007-09-18 22:11:00 +01:00
|
|
|
<screen><userinput remap="install">mv -v /usr/bin/find /bin
|
2014-03-12 20:29:13 +00:00
|
|
|
sed -i 's|find:=${BINDIR}|find:=/bin|' /usr/bin/updatedb</userinput></screen>
|
2006-07-23 12:05:22 +01:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 id="contents-findutils" role="content">
|
|
|
|
<title>Contents of Findutils</title>
|
|
|
|
|
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>Installed programs</segtitle>
|
2019-03-13 17:58:54 +00:00
|
|
|
<segtitle>Installed directory</segtitle>
|
2006-02-03 20:54:03 +00:00
|
|
|
|
|
|
|
<seglistitem>
|
2019-02-26 07:00:33 +00:00
|
|
|
<seg>find, locate, updatedb, and xargs</seg>
|
2019-03-13 17:58:54 +00:00
|
|
|
<seg>/var/lib/locate</seg>
|
2006-02-03 20:54:03 +00:00
|
|
|
</seglistitem>
|
2019-03-13 17:58:54 +00:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
</segmentedlist>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
|
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
|
|
|
|
<varlistentry id="find">
|
|
|
|
<term><command>find</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Searches given directory trees for files matching the specified
|
|
|
|
criteria</para>
|
|
|
|
<indexterm zone="ch-system-findutils find">
|
|
|
|
<primary sortas="b-find">find</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="locate">
|
|
|
|
<term><command>locate</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>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 locate">
|
|
|
|
<primary sortas="b-locate">locate</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="updatedb">
|
|
|
|
<term><command>updatedb</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Updates the <command>locate</command> 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 into
|
|
|
|
the database</para>
|
|
|
|
<indexterm zone="ch-system-findutils updatedb">
|
|
|
|
<primary sortas="b-updatedb">updatedb</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry id="xargs">
|
|
|
|
<term><command>xargs</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Can be used to apply a given command to a list of files</para>
|
|
|
|
<indexterm zone="ch-system-findutils xargs">
|
|
|
|
<primary sortas="b-xargs">xargs</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect2>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
|
|
|
</sect1>
|