findutils.xml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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 --localstatedir=/var/lib/locate</userinput></screen>
  37. <variablelist>
  38. <title>The meaning of the configure options:</title>
  39. <varlistentry>
  40. <term><parameter>--localstatedir</parameter></term>
  41. <listitem>
  42. <para>This option changes the location of the <command>locate</command>
  43. database to be in <filename class="directory">/var/lib/locate</filename>,
  44. which is FHS-compliant.</para>
  45. </listitem>
  46. </varlistentry>
  47. </variablelist>
  48. <para>Compile the package:</para>
  49. <screen><userinput remap="make">make</userinput></screen>
  50. <para>To test the results, issue:</para>
  51. <screen><userinput remap="test">make check</userinput></screen>
  52. <para>Two tests are known to fail in the chroot environment:
  53. sv-bug-54171.old-O3 and sv-bug-54171.new-O3.</para>
  54. <para>Install the package:</para>
  55. <screen><userinput remap="install">make install</userinput></screen>
  56. <para revision="sysv">Some of the scripts in the LFS-Bootscripts package
  57. depend on <command>find</command>. As <filename
  58. class="directory">/usr</filename> may not be available during the early
  59. stages of booting, this program needs to be on the root partition. The
  60. <command>updatedb</command> script also needs to be modified to correct an
  61. explicit path:</para>
  62. <para revision="systemd"> Some packages in BLFS and beyond expect the
  63. <command>find</command> program in <filename
  64. class="directory">/bin</filename>, so make sure it's placed there:</para>
  65. <screen><userinput remap="install">mv -v /usr/bin/find /bin
  66. sed -i 's|find:=${BINDIR}|find:=/bin|' /usr/bin/updatedb</userinput></screen>
  67. </sect2>
  68. <sect2 id="contents-findutils" role="content">
  69. <title>Contents of Findutils</title>
  70. <segmentedlist>
  71. <segtitle>Installed programs</segtitle>
  72. <segtitle>Installed directory</segtitle>
  73. <seglistitem>
  74. <seg>find, locate, updatedb, and xargs</seg>
  75. <seg>/var/lib/locate</seg>
  76. </seglistitem>
  77. </segmentedlist>
  78. <variablelist>
  79. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  80. <?dbfo list-presentation="list"?>
  81. <?dbhtml list-presentation="table"?>
  82. <varlistentry id="find">
  83. <term><command>find</command></term>
  84. <listitem>
  85. <para>Searches given directory trees for files matching the specified
  86. criteria</para>
  87. <indexterm zone="ch-system-findutils find">
  88. <primary sortas="b-find">find</primary>
  89. </indexterm>
  90. </listitem>
  91. </varlistentry>
  92. <varlistentry id="locate">
  93. <term><command>locate</command></term>
  94. <listitem>
  95. <para>Searches through a database of file names and reports the names
  96. that contain a given string or match a given pattern</para>
  97. <indexterm zone="ch-system-findutils locate">
  98. <primary sortas="b-locate">locate</primary>
  99. </indexterm>
  100. </listitem>
  101. </varlistentry>
  102. <varlistentry id="updatedb">
  103. <term><command>updatedb</command></term>
  104. <listitem>
  105. <para>Updates the <command>locate</command> database; it scans the
  106. entire file system (including other file systems that are currently
  107. mounted, unless told not to) and puts every file name it finds into
  108. the database</para>
  109. <indexterm zone="ch-system-findutils updatedb">
  110. <primary sortas="b-updatedb">updatedb</primary>
  111. </indexterm>
  112. </listitem>
  113. </varlistentry>
  114. <varlistentry id="xargs">
  115. <term><command>xargs</command></term>
  116. <listitem>
  117. <para>Can be used to apply a given command to a list of files</para>
  118. <indexterm zone="ch-system-findutils xargs">
  119. <primary sortas="b-xargs">xargs</primary>
  120. </indexterm>
  121. </listitem>
  122. </varlistentry>
  123. </variablelist>
  124. </sect2>
  125. </sect1>