findutils.xml 5.8 KB

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