findutils.xml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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. <!-- this has been fixed in upstream gnulib, when a new version of
  36. findutils is released, please check #4055 to see if the change has been
  37. picked up in this package -->
  38. <para>First, suppress a test which on some machines can loop forever:</para>
  39. <screen><userinput remap="pre">sed -i 's/test-lock..EXEEXT.//' tests/Makefile.in</userinput></screen>
  40. <para>Prepare Findutils for compilation:</para>
  41. <screen><userinput remap="configure">./configure --prefix=/usr --localstatedir=/var/lib/locate</userinput></screen>
  42. <variablelist>
  43. <title>The meaning of the configure options:</title>
  44. <varlistentry>
  45. <term><parameter>--localstatedir</parameter></term>
  46. <listitem>
  47. <para>This option changes the location of the <command>locate</command>
  48. database to be in <filename class="directory">/var/lib/locate</filename>,
  49. which is FHS-compliant.</para>
  50. </listitem>
  51. </varlistentry>
  52. </variablelist>
  53. <para>Compile the package:</para>
  54. <screen><userinput remap="make">make</userinput></screen>
  55. <para>To test the results, issue:</para>
  56. <screen><userinput remap="test">make check</userinput></screen>
  57. <para>Install the package:</para>
  58. <screen><userinput remap="install">make install</userinput></screen>
  59. <para revision="sysv">Some of the scripts in the LFS-Bootscripts package
  60. depend on <command>find</command>. As <filename
  61. class="directory">/usr</filename> may not be available during the early
  62. stages of booting, this program needs to be on the root partition. The
  63. <command>updatedb</command> script also needs to be modified to correct an
  64. explicit path:</para>
  65. <para revision="systemd"> Some packages in BLFS and beyond expect the
  66. <command>find</command> program in <filename
  67. class="directory">/bin</filename>, so make sure it's placed there:</para>
  68. <screen><userinput remap="install">mv -v /usr/bin/find /bin
  69. sed -i 's|find:=${BINDIR}|find:=/bin|' /usr/bin/updatedb</userinput></screen>
  70. </sect2>
  71. <sect2 id="contents-findutils" role="content">
  72. <title>Contents of Findutils</title>
  73. <segmentedlist>
  74. <segtitle>Installed programs</segtitle>
  75. <seglistitem>
  76. <seg>code, find, locate, oldfind, updatedb, and xargs</seg>
  77. </seglistitem>
  78. </segmentedlist>
  79. <variablelist>
  80. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  81. <?dbfo list-presentation="list"?>
  82. <?dbhtml list-presentation="table"?>
  83. <varlistentry id="code">
  84. <term><command>code</command></term>
  85. <listitem>
  86. <para>Was formerly used to produce <command>locate</command>
  87. databases; it is the ancestor of <command>frcode</command></para>
  88. <indexterm zone="ch-system-findutils code">
  89. <primary sortas="b-code">code</primary>
  90. </indexterm>
  91. </listitem>
  92. </varlistentry>
  93. <varlistentry id="find">
  94. <term><command>find</command></term>
  95. <listitem>
  96. <para>Searches given directory trees for files matching the specified
  97. criteria</para>
  98. <indexterm zone="ch-system-findutils find">
  99. <primary sortas="b-find">find</primary>
  100. </indexterm>
  101. </listitem>
  102. </varlistentry>
  103. <varlistentry id="locate">
  104. <term><command>locate</command></term>
  105. <listitem>
  106. <para>Searches through a database of file names and reports the names
  107. that contain a given string or match a given pattern</para>
  108. <indexterm zone="ch-system-findutils locate">
  109. <primary sortas="b-locate">locate</primary>
  110. </indexterm>
  111. </listitem>
  112. </varlistentry>
  113. <varlistentry id="oldfind">
  114. <term><command>oldfind</command></term>
  115. <listitem>
  116. <para>Older version of find, using a different algorithm</para>
  117. <indexterm zone="ch-system-findutils oldfind">
  118. <primary sortas="b-oldfind">oldfind</primary>
  119. </indexterm>
  120. </listitem>
  121. </varlistentry>
  122. <varlistentry id="updatedb">
  123. <term><command>updatedb</command></term>
  124. <listitem>
  125. <para>Updates the <command>locate</command> database; it scans the
  126. entire file system (including other file systems that are currently
  127. mounted, unless told not to) and puts every file name it finds into
  128. the database</para>
  129. <indexterm zone="ch-system-findutils updatedb">
  130. <primary sortas="b-updatedb">updatedb</primary>
  131. </indexterm>
  132. </listitem>
  133. </varlistentry>
  134. <varlistentry id="xargs">
  135. <term><command>xargs</command></term>
  136. <listitem>
  137. <para>Can be used to apply a given command to a list of files</para>
  138. <indexterm zone="ch-system-findutils xargs">
  139. <primary sortas="b-xargs">xargs</primary>
  140. </indexterm>
  141. </listitem>
  142. </varlistentry>
  143. </variablelist>
  144. </sect2>
  145. </sect1>