findutils.xml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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. <sect1 id="ch-system-findutils" role="wrap">
  8. <?dbhtml filename="findutils.html"?>
  9. <sect1info condition="script">
  10. <productname>findutils</productname>
  11. <productnumber>&findutils-version;</productnumber>
  12. <address>&findutils-url;</address>
  13. </sect1info>
  14. <title>Findutils-&findutils-version;</title>
  15. <indexterm zone="ch-system-findutils">
  16. <primary sortas="a-Findutils">Findutils</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The Findutils package contains programs to find files. These programs
  21. are provided to recursively search through a directory tree and to
  22. create, maintain, and search a database (often faster than the recursive
  23. find, but unreliable if the database has not been recently updated).</para>
  24. <segmentedlist>
  25. <segtitle>&buildtime;</segtitle>
  26. <segtitle>&diskspace;</segtitle>
  27. <seglistitem>
  28. <seg>&findutils-ch6-sbu;</seg>
  29. <seg>&findutils-ch6-du;</seg>
  30. </seglistitem>
  31. </segmentedlist>
  32. </sect2>
  33. <sect2 role="installation">
  34. <title>Installation of Findutils</title>
  35. <para>Prepare Findutils for compilation:</para>
  36. <screen><userinput remap="configure">./configure --prefix=/usr --libexecdir=/usr/lib/findutils \
  37. --localstatedir=/var/lib/locate</userinput></screen>
  38. <variablelist>
  39. <title>The meaning of the configure options:</title>
  40. <varlistentry>
  41. <term><parameter>--localstatedir</parameter></term>
  42. <listitem>
  43. <para>This option changes the location of the <command>locate</command>
  44. database to be in <filename class="directory">/var/lib/locate</filename>,
  45. which is FHS-compliant.</para>
  46. </listitem>
  47. </varlistentry>
  48. </variablelist>
  49. <para>Compile the package:</para>
  50. <screen><userinput remap="make">make</userinput></screen>
  51. <para>To test the results, issue:</para>
  52. <screen><userinput remap="test">make check</userinput></screen>
  53. <para>Install the package:</para>
  54. <screen><userinput remap="install">make install</userinput></screen>
  55. <para>Some of the scripts in the LFS-Bootscripts package depend on
  56. <command>find</command>. As <filename class="directory">/usr</filename>
  57. may not be available during the early stages of booting, this program
  58. needs to be on the root partition. The <command>updatedb</command>
  59. script also needs to be modified to correct an explicit path:</para>
  60. <screen><userinput remap="install">mv -v /usr/bin/find /bin
  61. sed -i -e 's/find:=${BINDIR}/find:=\/bin/' /usr/bin/updatedb</userinput></screen>
  62. </sect2>
  63. <sect2 id="contents-findutils" role="content">
  64. <title>Contents of Findutils</title>
  65. <segmentedlist>
  66. <segtitle>Installed programs</segtitle>
  67. <seglistitem>
  68. <seg>bigram, code, find, frcode, locate, updatedb, and xargs</seg>
  69. </seglistitem>
  70. </segmentedlist>
  71. <variablelist>
  72. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  73. <?dbfo list-presentation="list"?>
  74. <?dbhtml list-presentation="table"?>
  75. <varlistentry id="bigram">
  76. <term><command>bigram</command></term>
  77. <listitem>
  78. <para>Was formerly used to produce <command>locate</command>
  79. databases</para>
  80. <indexterm zone="ch-system-findutils bigram">
  81. <primary sortas="b-bigram">bigram</primary>
  82. </indexterm>
  83. </listitem>
  84. </varlistentry>
  85. <varlistentry id="code">
  86. <term><command>code</command></term>
  87. <listitem>
  88. <para>Was formerly used to produce <command>locate</command>
  89. databases; it is the ancestor of <command>frcode</command>.</para>
  90. <indexterm zone="ch-system-findutils code">
  91. <primary sortas="b-code">code</primary>
  92. </indexterm>
  93. </listitem>
  94. </varlistentry>
  95. <varlistentry id="find">
  96. <term><command>find</command></term>
  97. <listitem>
  98. <para>Searches given directory trees for files matching the specified
  99. criteria</para>
  100. <indexterm zone="ch-system-findutils find">
  101. <primary sortas="b-find">find</primary>
  102. </indexterm>
  103. </listitem>
  104. </varlistentry>
  105. <varlistentry id="frcode">
  106. <term><command>frcode</command></term>
  107. <listitem>
  108. <para>Is called by <command>updatedb</command> to compress the list
  109. of file names; it uses front-compression, reducing the database size
  110. by a factor of four to five.</para>
  111. <indexterm zone="ch-system-findutils frcode">
  112. <primary sortas="b-frcode">frcode</primary>
  113. </indexterm>
  114. </listitem>
  115. </varlistentry>
  116. <varlistentry id="locate">
  117. <term><command>locate</command></term>
  118. <listitem>
  119. <para>Searches through a database of file names and reports the names
  120. that contain a given string or match a given pattern</para>
  121. <indexterm zone="ch-system-findutils locate">
  122. <primary sortas="b-locate">locate</primary>
  123. </indexterm>
  124. </listitem>
  125. </varlistentry>
  126. <varlistentry id="updatedb">
  127. <term><command>updatedb</command></term>
  128. <listitem>
  129. <para>Updates the <command>locate</command> database; it scans the
  130. entire file system (including other file systems that are currently
  131. mounted, unless told not to) and puts every file name it finds into
  132. the database</para>
  133. <indexterm zone="ch-system-findutils updatedb">
  134. <primary sortas="b-updatedb">updatedb</primary>
  135. </indexterm>
  136. </listitem>
  137. </varlistentry>
  138. <varlistentry id="xargs">
  139. <term><command>xargs</command></term>
  140. <listitem>
  141. <para>Can be used to apply a given command to a list of files</para>
  142. <indexterm zone="ch-system-findutils xargs">
  143. <primary sortas="b-xargs">xargs</primary>
  144. </indexterm>
  145. </listitem>
  146. </varlistentry>
  147. </variablelist>
  148. </sect2>
  149. </sect1>