[fcc02767] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 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 |
|
---|
[f2ab0c5] | 50 | <screen><userinput remap="configure">case $(uname -m) in
|
---|
| 51 | i?86) TIME_T_32_BIT_OK=yes ./configure --prefix=/usr --localstatedir=/var/lib/locate ;;
|
---|
| 52 | x86_64) ./configure --prefix=/usr --localstatedir=/var/lib/locate ;;
|
---|
| 53 | esac</userinput></screen>
|
---|
[fcc02767] | 54 |
|
---|
| 55 | <variablelist>
|
---|
| 56 | <title>The meaning of the configure options:</title>
|
---|
| 57 |
|
---|
[4b4f934] | 58 | <varlistentry>
|
---|
| 59 | <term><command>TIME_32_BIT_OK=yes</command></term>
|
---|
| 60 | <listitem>
|
---|
| 61 | <para>This setting is needed for building on a 32 bit system.</para>
|
---|
| 62 | </listitem>
|
---|
| 63 | </varlistentry>
|
---|
| 64 |
|
---|
[fcc02767] | 65 | <varlistentry>
|
---|
| 66 | <term><parameter>--localstatedir</parameter></term>
|
---|
| 67 | <listitem>
|
---|
[2da001c1] | 68 | <para>This option moves the <command>locate</command>
|
---|
| 69 | database to <filename class="directory">/var/lib/locate</filename>,
|
---|
| 70 | which is the FHS-compliant location.</para>
|
---|
[fcc02767] | 71 | </listitem>
|
---|
| 72 | </varlistentry>
|
---|
| 73 |
|
---|
| 74 | </variablelist>
|
---|
| 75 |
|
---|
| 76 | <para>Compile the package:</para>
|
---|
| 77 |
|
---|
| 78 | <screen><userinput remap="make">make</userinput></screen>
|
---|
| 79 |
|
---|
| 80 | <para>To test the results, issue:</para>
|
---|
| 81 |
|
---|
| 82 | <screen><userinput remap="test">chown -Rv tester .
|
---|
| 83 | su tester -c "PATH=$PATH make check"</userinput></screen>
|
---|
| 84 |
|
---|
| 85 | <para>Install the package:</para>
|
---|
| 86 |
|
---|
| 87 | <screen><userinput remap="install">make install</userinput></screen>
|
---|
| 88 |
|
---|
| 89 | </sect2>
|
---|
| 90 |
|
---|
| 91 | <sect2 id="contents-findutils" role="content">
|
---|
| 92 | <title>Contents of Findutils</title>
|
---|
| 93 |
|
---|
| 94 | <segmentedlist>
|
---|
| 95 | <segtitle>Installed programs</segtitle>
|
---|
| 96 | <segtitle>Installed directory</segtitle>
|
---|
| 97 |
|
---|
| 98 | <seglistitem>
|
---|
| 99 | <seg>find, locate, updatedb, and xargs</seg>
|
---|
| 100 | <seg>/var/lib/locate</seg>
|
---|
| 101 | </seglistitem>
|
---|
| 102 |
|
---|
| 103 | </segmentedlist>
|
---|
| 104 |
|
---|
| 105 | <variablelist>
|
---|
| 106 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 107 | <?dbfo list-presentation="list"?>
|
---|
| 108 | <?dbhtml list-presentation="table"?>
|
---|
| 109 |
|
---|
| 110 | <varlistentry id="find">
|
---|
| 111 | <term><command>find</command></term>
|
---|
| 112 | <listitem>
|
---|
| 113 | <para>Searches given directory trees for files matching the specified
|
---|
| 114 | criteria</para>
|
---|
| 115 | <indexterm zone="ch-system-findutils find">
|
---|
| 116 | <primary sortas="b-find">find</primary>
|
---|
| 117 | </indexterm>
|
---|
| 118 | </listitem>
|
---|
| 119 | </varlistentry>
|
---|
| 120 |
|
---|
| 121 | <varlistentry id="locate">
|
---|
| 122 | <term><command>locate</command></term>
|
---|
| 123 | <listitem>
|
---|
| 124 | <para>Searches through a database of file names and reports the names
|
---|
| 125 | that contain a given string or match a given pattern</para>
|
---|
| 126 | <indexterm zone="ch-system-findutils locate">
|
---|
| 127 | <primary sortas="b-locate">locate</primary>
|
---|
| 128 | </indexterm>
|
---|
| 129 | </listitem>
|
---|
| 130 | </varlistentry>
|
---|
| 131 |
|
---|
| 132 | <varlistentry id="updatedb">
|
---|
| 133 | <term><command>updatedb</command></term>
|
---|
| 134 | <listitem>
|
---|
| 135 | <para>Updates the <command>locate</command> database; it scans the
|
---|
| 136 | entire file system (including other file systems that are currently
|
---|
| 137 | mounted, unless told not to) and puts every file name it finds into
|
---|
| 138 | the database</para>
|
---|
| 139 | <indexterm zone="ch-system-findutils updatedb">
|
---|
| 140 | <primary sortas="b-updatedb">updatedb</primary>
|
---|
| 141 | </indexterm>
|
---|
| 142 | </listitem>
|
---|
| 143 | </varlistentry>
|
---|
| 144 |
|
---|
| 145 | <varlistentry id="xargs">
|
---|
| 146 | <term><command>xargs</command></term>
|
---|
| 147 | <listitem>
|
---|
| 148 | <para>Can be used to apply a given command to a list of files</para>
|
---|
| 149 | <indexterm zone="ch-system-findutils xargs">
|
---|
| 150 | <primary sortas="b-xargs">xargs</primary>
|
---|
| 151 | </indexterm>
|
---|
| 152 | </listitem>
|
---|
| 153 | </varlistentry>
|
---|
| 154 |
|
---|
| 155 | </variablelist>
|
---|
| 156 |
|
---|
| 157 | </sect2>
|
---|
| 158 |
|
---|
| 159 | </sect1>
|
---|