123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- <?xml version="1.0" encoding="ISO-8859-1"?>
- <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
- <!ENTITY % general-entities SYSTEM "../general.ent">
- %general-entities;
- ]>
- <sect1 id="ch-system-findutils" role="wrap">
- <?dbhtml filename="findutils.html"?>
- <sect1info condition="script">
- <productname>findutils</productname>
- <productnumber>&findutils-version;</productnumber>
- <address>&findutils-url;</address>
- </sect1info>
- <title>Findutils-&findutils-version;</title>
- <indexterm zone="ch-system-findutils">
- <primary sortas="a-Findutils">Findutils</primary>
- </indexterm>
- <sect2 role="package">
- <title/>
- <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>
- <segmentedlist>
- <segtitle>&buildtime;</segtitle>
- <segtitle>&diskspace;</segtitle>
- <seglistitem>
- <seg>&findutils-ch6-sbu;</seg>
- <seg>&findutils-ch6-du;</seg>
- </seglistitem>
- </segmentedlist>
- </sect2>
- <sect2 role="installation">
- <title>Installation of Findutils</title>
- <!-- this has been fixed in upstream gnulib, when a new version of
- findutils is released, please check #4055 to see if the change has been
- picked up in this package -->
- <para>First, suppress a test which on some machines can loop forever:</para>
- <screen><userinput remap="pre">sed -i 's/test-lock..EXEEXT.//' tests/Makefile.in</userinput></screen>
- <para>Next, make some fixes required by glibc-2.28 and later:</para>
- <screen><userinput remap="pre">sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' gl/lib/*.c
- sed -i '/unistd/a #include <sys/sysmacros.h>' gl/lib/mountlist.c
- echo "#define _IO_IN_BACKUP 0x100" >> gl/lib/stdio-impl.h</userinput></screen>
- <para>Prepare Findutils for compilation:</para>
- <screen><userinput remap="configure">./configure --prefix=/usr --localstatedir=/var/lib/locate</userinput></screen>
- <variablelist>
- <title>The meaning of the configure options:</title>
- <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>
- </variablelist>
- <para>Compile the package:</para>
- <screen><userinput remap="make">make</userinput></screen>
- <para>To test the results, issue:</para>
- <screen><userinput remap="test">make check</userinput></screen>
- <para>Install the package:</para>
- <screen><userinput remap="install">make install</userinput></screen>
- <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>
- <screen><userinput remap="install">mv -v /usr/bin/find /bin
- sed -i 's|find:=${BINDIR}|find:=/bin|' /usr/bin/updatedb</userinput></screen>
- </sect2>
- <sect2 id="contents-findutils" role="content">
- <title>Contents of Findutils</title>
- <segmentedlist>
- <segtitle>Installed programs</segtitle>
- <segtitle>Installed directory</segtitle>
- <seglistitem>
- <seg>find, locate, updatedb, and xargs</seg>
- <seg>/var/lib/locate</seg>
- </seglistitem>
- </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>
- </sect1>
|