[7152faa] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[fcc02767] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
| 8 | <sect1 id="ch-system-findutils" role="wrap">
|
---|
| 9 | <?dbhtml filename="findutils.html"?>
|
---|
| 10 |
|
---|
| 11 | <sect1info condition="script">
|
---|
| 12 | <productname>findutils</productname>
|
---|
| 13 | <productnumber>&findutils-version;</productnumber>
|
---|
| 14 | <address>&findutils-url;</address>
|
---|
| 15 | </sect1info>
|
---|
| 16 |
|
---|
| 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/>
|
---|
| 25 |
|
---|
[2da001c1] | 26 | <para>The Findutils package contains programs to find files. Programs
|
---|
| 27 | are provided to search through all the files in a directory tree and to
|
---|
[fcc02767] | 28 | create, maintain, and search a database (often faster than the recursive
|
---|
[2da001c1] | 29 | find, but unreliable unless the database has been updated recently).
|
---|
| 30 | Findutils also supplies the <command>xargs</command> program, which
|
---|
| 31 | can be used to run a specified command on each file selected by a search.</para>
|
---|
[fcc02767] | 32 |
|
---|
| 33 | <segmentedlist>
|
---|
| 34 | <segtitle>&buildtime;</segtitle>
|
---|
| 35 | <segtitle>&diskspace;</segtitle>
|
---|
| 36 |
|
---|
| 37 | <seglistitem>
|
---|
[fb386e0] | 38 | <seg>&findutils-fin-sbu;</seg>
|
---|
| 39 | <seg>&findutils-fin-du;</seg>
|
---|
[fcc02767] | 40 | </seglistitem>
|
---|
| 41 | </segmentedlist>
|
---|
| 42 |
|
---|
| 43 | </sect2>
|
---|
| 44 |
|
---|
| 45 | <sect2 role="installation">
|
---|
| 46 | <title>Installation of Findutils</title>
|
---|
| 47 |
|
---|
| 48 | <para>Prepare Findutils for compilation:</para>
|
---|
| 49 |
|
---|
[b371ee7] | 50 | <!-- no longer needed with gcc13
|
---|
[f2ab0c5] | 51 | <screen><userinput remap="configure">case $(uname -m) in
|
---|
[b371ee7] | 52 | i?86) TIME_T_32_BIT_OK=yes ./configure - -prefix=/usr - -localstatedir=/var/lib/locate ;;
|
---|
| 53 | x86_64) ./configure - -prefix=/usr - -localstatedir=/var/lib/locate ;;
|
---|
[f2ab0c5] | 54 | esac</userinput></screen>
|
---|
[b371ee7] | 55 | -->
|
---|
[a4e48bc4] | 56 | <screen><userinput remap="configure">./configure --prefix=/usr --localstatedir=/var/lib/locate</userinput></screen>
|
---|
[b012036] | 57 |
|
---|
[fcc02767] | 58 | <variablelist>
|
---|
| 59 | <title>The meaning of the configure options:</title>
|
---|
[b371ee7] | 60 | <!--
|
---|
[4b4f934] | 61 | <varlistentry>
|
---|
| 62 | <term><command>TIME_32_BIT_OK=yes</command></term>
|
---|
| 63 | <listitem>
|
---|
| 64 | <para>This setting is needed for building on a 32 bit system.</para>
|
---|
| 65 | </listitem>
|
---|
| 66 | </varlistentry>
|
---|
[b371ee7] | 67 | -->
|
---|
[fcc02767] | 68 | <varlistentry>
|
---|
| 69 | <term><parameter>--localstatedir</parameter></term>
|
---|
| 70 | <listitem>
|
---|
[2da001c1] | 71 | <para>This option moves the <command>locate</command>
|
---|
| 72 | database to <filename class="directory">/var/lib/locate</filename>,
|
---|
| 73 | which is the FHS-compliant location.</para>
|
---|
[fcc02767] | 74 | </listitem>
|
---|
| 75 | </varlistentry>
|
---|
| 76 |
|
---|
| 77 | </variablelist>
|
---|
| 78 |
|
---|
| 79 | <para>Compile the package:</para>
|
---|
| 80 |
|
---|
| 81 | <screen><userinput remap="make">make</userinput></screen>
|
---|
| 82 |
|
---|
| 83 | <para>To test the results, issue:</para>
|
---|
| 84 |
|
---|
| 85 | <screen><userinput remap="test">chown -Rv tester .
|
---|
| 86 | su tester -c "PATH=$PATH make check"</userinput></screen>
|
---|
| 87 |
|
---|
| 88 | <para>Install the package:</para>
|
---|
| 89 |
|
---|
| 90 | <screen><userinput remap="install">make install</userinput></screen>
|
---|
| 91 |
|
---|
| 92 | </sect2>
|
---|
| 93 |
|
---|
| 94 | <sect2 id="contents-findutils" role="content">
|
---|
| 95 | <title>Contents of Findutils</title>
|
---|
| 96 |
|
---|
| 97 | <segmentedlist>
|
---|
| 98 | <segtitle>Installed programs</segtitle>
|
---|
| 99 | <segtitle>Installed directory</segtitle>
|
---|
| 100 |
|
---|
| 101 | <seglistitem>
|
---|
| 102 | <seg>find, locate, updatedb, and xargs</seg>
|
---|
| 103 | <seg>/var/lib/locate</seg>
|
---|
| 104 | </seglistitem>
|
---|
| 105 |
|
---|
| 106 | </segmentedlist>
|
---|
| 107 |
|
---|
| 108 | <variablelist>
|
---|
| 109 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 110 | <?dbfo list-presentation="list"?>
|
---|
| 111 | <?dbhtml list-presentation="table"?>
|
---|
| 112 |
|
---|
| 113 | <varlistentry id="find">
|
---|
| 114 | <term><command>find</command></term>
|
---|
| 115 | <listitem>
|
---|
| 116 | <para>Searches given directory trees for files matching the specified
|
---|
| 117 | criteria</para>
|
---|
| 118 | <indexterm zone="ch-system-findutils find">
|
---|
| 119 | <primary sortas="b-find">find</primary>
|
---|
| 120 | </indexterm>
|
---|
| 121 | </listitem>
|
---|
| 122 | </varlistentry>
|
---|
| 123 |
|
---|
| 124 | <varlistentry id="locate">
|
---|
| 125 | <term><command>locate</command></term>
|
---|
| 126 | <listitem>
|
---|
| 127 | <para>Searches through a database of file names and reports the names
|
---|
| 128 | that contain a given string or match a given pattern</para>
|
---|
| 129 | <indexterm zone="ch-system-findutils locate">
|
---|
| 130 | <primary sortas="b-locate">locate</primary>
|
---|
| 131 | </indexterm>
|
---|
| 132 | </listitem>
|
---|
| 133 | </varlistentry>
|
---|
| 134 |
|
---|
| 135 | <varlistentry id="updatedb">
|
---|
| 136 | <term><command>updatedb</command></term>
|
---|
| 137 | <listitem>
|
---|
| 138 | <para>Updates the <command>locate</command> database; it scans the
|
---|
| 139 | entire file system (including other file systems that are currently
|
---|
| 140 | mounted, unless told not to) and puts every file name it finds into
|
---|
| 141 | the database</para>
|
---|
| 142 | <indexterm zone="ch-system-findutils updatedb">
|
---|
| 143 | <primary sortas="b-updatedb">updatedb</primary>
|
---|
| 144 | </indexterm>
|
---|
| 145 | </listitem>
|
---|
| 146 | </varlistentry>
|
---|
| 147 |
|
---|
| 148 | <varlistentry id="xargs">
|
---|
| 149 | <term><command>xargs</command></term>
|
---|
| 150 | <listitem>
|
---|
| 151 | <para>Can be used to apply a given command to a list of files</para>
|
---|
| 152 | <indexterm zone="ch-system-findutils xargs">
|
---|
| 153 | <primary sortas="b-xargs">xargs</primary>
|
---|
| 154 | </indexterm>
|
---|
| 155 | </listitem>
|
---|
| 156 | </varlistentry>
|
---|
| 157 |
|
---|
| 158 | </variablelist>
|
---|
| 159 |
|
---|
| 160 | </sect2>
|
---|
| 161 |
|
---|
| 162 | </sect1>
|
---|