[673b0d8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[b06ca36] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[673b0d8] | 4 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
[54e422c1] | 7 |
|
---|
[81fd230] | 8 | <sect1 id="ch-system-findutils" role="wrap">
|
---|
[54e422c1] | 9 | <?dbhtml filename="findutils.html"?>
|
---|
| 10 |
|
---|
[e747759] | 11 | <sect1info condition="script">
|
---|
| 12 | <productname>findutils</productname>
|
---|
| 13 | <productnumber>&findutils-version;</productnumber>
|
---|
| 14 | <address>&findutils-url;</address>
|
---|
| 15 | </sect1info>
|
---|
| 16 |
|
---|
[54e422c1] | 17 | <title>Findutils-&findutils-version;</title>
|
---|
| 18 |
|
---|
| 19 | <indexterm zone="ch-system-findutils">
|
---|
| 20 | <primary sortas="a-Findutils">Findutils</primary>
|
---|
| 21 | </indexterm>
|
---|
| 22 |
|
---|
| 23 | <sect2 role="package">
|
---|
| 24 | <title/>
|
---|
[6370fa6] | 25 |
|
---|
[54e422c1] | 26 | <para>The Findutils package contains programs to find files. These programs
|
---|
| 27 | are provided to recursively search through a directory tree and to
|
---|
| 28 | create, maintain, and search a database (often faster than the recursive
|
---|
| 29 | find, but unreliable if the database has not been recently updated).</para>
|
---|
[5888299] | 30 |
|
---|
[54e422c1] | 31 | <segmentedlist>
|
---|
| 32 | <segtitle>&buildtime;</segtitle>
|
---|
| 33 | <segtitle>&diskspace;</segtitle>
|
---|
[673b0d8] | 34 |
|
---|
[54e422c1] | 35 | <seglistitem>
|
---|
[e4a5635] | 36 | <seg>&findutils-ch6-sbu;</seg>
|
---|
| 37 | <seg>&findutils-ch6-du;</seg>
|
---|
[54e422c1] | 38 | </seglistitem>
|
---|
| 39 | </segmentedlist>
|
---|
[673b0d8] | 40 |
|
---|
[54e422c1] | 41 | </sect2>
|
---|
| 42 |
|
---|
| 43 | <sect2 role="installation">
|
---|
| 44 | <title>Installation of Findutils</title>
|
---|
| 45 |
|
---|
[e812ed0] | 46 | <!-- this has been fixed in upstream gnulib, when a new version of
|
---|
| 47 | findutils is released, please check #4055 to see if the change has been
|
---|
| 48 | picked up in this package -->
|
---|
[f6dd9ab] | 49 | <para>First, suppress a test which on some machines can loop forever:</para>
|
---|
[e812ed0] | 50 |
|
---|
[2dea807] | 51 | <screen><userinput remap="pre">sed -i 's/test-lock..EXEEXT.//' tests/Makefile.in</userinput></screen>
|
---|
[e812ed0] | 52 |
|
---|
[597ec03] | 53 | <para>Next, make some fixes required by glibc-2.28 and later:</para>
|
---|
[efca30a] | 54 |
|
---|
| 55 | <screen><userinput remap="pre">sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' gl/lib/*.c
|
---|
| 56 | sed -i '/unistd/a #include <sys/sysmacros.h>' gl/lib/mountlist.c
|
---|
| 57 | echo "#define _IO_IN_BACKUP 0x100" >> gl/lib/stdio-impl.h</userinput></screen>
|
---|
| 58 |
|
---|
[54e422c1] | 59 | <para>Prepare Findutils for compilation:</para>
|
---|
[73aedd1d] | 60 |
|
---|
[3dc9543] | 61 | <screen><userinput remap="configure">./configure --prefix=/usr --localstatedir=/var/lib/locate</userinput></screen>
|
---|
[73aedd1d] | 62 |
|
---|
[54e422c1] | 63 | <variablelist>
|
---|
| 64 | <title>The meaning of the configure options:</title>
|
---|
[06948c1] | 65 |
|
---|
[54e422c1] | 66 | <varlistentry>
|
---|
| 67 | <term><parameter>--localstatedir</parameter></term>
|
---|
| 68 | <listitem>
|
---|
| 69 | <para>This option changes the location of the <command>locate</command>
|
---|
| 70 | database to be in <filename class="directory">/var/lib/locate</filename>,
|
---|
| 71 | which is FHS-compliant.</para>
|
---|
| 72 | </listitem>
|
---|
| 73 | </varlistentry>
|
---|
[81fd230] | 74 |
|
---|
[54e422c1] | 75 | </variablelist>
|
---|
| 76 |
|
---|
| 77 | <para>Compile the package:</para>
|
---|
[73aedd1d] | 78 |
|
---|
[0445a3d] | 79 | <screen><userinput remap="make">make</userinput></screen>
|
---|
[73aedd1d] | 80 |
|
---|
[0445a3d] | 81 | <para>To test the results, issue:</para>
|
---|
| 82 |
|
---|
| 83 | <screen><userinput remap="test">make check</userinput></screen>
|
---|
[73aedd1d] | 84 |
|
---|
[54e422c1] | 85 | <para>Install the package:</para>
|
---|
[73aedd1d] | 86 |
|
---|
[0445a3d] | 87 | <screen><userinput remap="install">make install</userinput></screen>
|
---|
[73aedd1d] | 88 |
|
---|
[1118b17] | 89 | <para revision="sysv">Some of the scripts in the LFS-Bootscripts package
|
---|
| 90 | depend on <command>find</command>. As <filename
|
---|
| 91 | class="directory">/usr</filename> may not be available during the early
|
---|
| 92 | stages of booting, this program needs to be on the root partition. The
|
---|
| 93 | <command>updatedb</command> script also needs to be modified to correct an
|
---|
| 94 | explicit path:</para>
|
---|
| 95 |
|
---|
| 96 | <para revision="systemd"> Some packages in BLFS and beyond expect the
|
---|
| 97 | <command>find</command> program in <filename
|
---|
| 98 | class="directory">/bin</filename>, so make sure it's placed there:</para>
|
---|
[b540268] | 99 |
|
---|
[0445a3d] | 100 | <screen><userinput remap="install">mv -v /usr/bin/find /bin
|
---|
[a57d556] | 101 | sed -i 's|find:=${BINDIR}|find:=/bin|' /usr/bin/updatedb</userinput></screen>
|
---|
[e1060de] | 102 |
|
---|
[54e422c1] | 103 | </sect2>
|
---|
| 104 |
|
---|
| 105 | <sect2 id="contents-findutils" role="content">
|
---|
| 106 | <title>Contents of Findutils</title>
|
---|
| 107 |
|
---|
| 108 | <segmentedlist>
|
---|
| 109 | <segtitle>Installed programs</segtitle>
|
---|
[78cc3be] | 110 | <segtitle>Installed directory</segtitle>
|
---|
[54e422c1] | 111 |
|
---|
| 112 | <seglistitem>
|
---|
[2b75e7e5] | 113 | <seg>find, locate, updatedb, and xargs</seg>
|
---|
[78cc3be] | 114 | <seg>/var/lib/locate</seg>
|
---|
[54e422c1] | 115 | </seglistitem>
|
---|
[78cc3be] | 116 |
|
---|
[54e422c1] | 117 | </segmentedlist>
|
---|
| 118 |
|
---|
| 119 | <variablelist>
|
---|
| 120 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 121 | <?dbfo list-presentation="list"?>
|
---|
| 122 | <?dbhtml list-presentation="table"?>
|
---|
| 123 |
|
---|
| 124 | <varlistentry id="find">
|
---|
| 125 | <term><command>find</command></term>
|
---|
| 126 | <listitem>
|
---|
| 127 | <para>Searches given directory trees for files matching the specified
|
---|
| 128 | criteria</para>
|
---|
| 129 | <indexterm zone="ch-system-findutils find">
|
---|
| 130 | <primary sortas="b-find">find</primary>
|
---|
| 131 | </indexterm>
|
---|
| 132 | </listitem>
|
---|
| 133 | </varlistentry>
|
---|
| 134 |
|
---|
| 135 | <varlistentry id="locate">
|
---|
| 136 | <term><command>locate</command></term>
|
---|
| 137 | <listitem>
|
---|
| 138 | <para>Searches through a database of file names and reports the names
|
---|
| 139 | that contain a given string or match a given pattern</para>
|
---|
| 140 | <indexterm zone="ch-system-findutils locate">
|
---|
| 141 | <primary sortas="b-locate">locate</primary>
|
---|
| 142 | </indexterm>
|
---|
| 143 | </listitem>
|
---|
| 144 | </varlistentry>
|
---|
| 145 |
|
---|
| 146 | <varlistentry id="updatedb">
|
---|
| 147 | <term><command>updatedb</command></term>
|
---|
| 148 | <listitem>
|
---|
| 149 | <para>Updates the <command>locate</command> database; it scans the
|
---|
| 150 | entire file system (including other file systems that are currently
|
---|
| 151 | mounted, unless told not to) and puts every file name it finds into
|
---|
| 152 | the database</para>
|
---|
| 153 | <indexterm zone="ch-system-findutils updatedb">
|
---|
| 154 | <primary sortas="b-updatedb">updatedb</primary>
|
---|
| 155 | </indexterm>
|
---|
| 156 | </listitem>
|
---|
| 157 | </varlistentry>
|
---|
| 158 |
|
---|
| 159 | <varlistentry id="xargs">
|
---|
| 160 | <term><command>xargs</command></term>
|
---|
| 161 | <listitem>
|
---|
| 162 | <para>Can be used to apply a given command to a list of files</para>
|
---|
| 163 | <indexterm zone="ch-system-findutils xargs">
|
---|
| 164 | <primary sortas="b-xargs">xargs</primary>
|
---|
| 165 | </indexterm>
|
---|
| 166 | </listitem>
|
---|
| 167 | </varlistentry>
|
---|
| 168 |
|
---|
| 169 | </variablelist>
|
---|
| 170 |
|
---|
| 171 | </sect2>
|
---|
[673b0d8] | 172 |
|
---|
| 173 | </sect1>
|
---|