mirror of
https://github.com/LCTT/LFS-BOOK-7.7-systemd.git
synced 2026-01-14 00:49:09 +00:00
313 lines
10 KiB
HTML
313 lines
10 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content=
|
|
"application/xhtml+xml; charset=utf-8" />
|
|
<title>
|
|
6.48. Findutils-4.4.2
|
|
</title>
|
|
<link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
|
|
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
|
|
<link rel="stylesheet" href="../stylesheets/lfs-print.css" type="text/css"
|
|
media="print" />
|
|
</head>
|
|
<body class="lfs" id="lfs-7.7-systemd">
|
|
<div class="navheader">
|
|
<h4>
|
|
Linux From Scratch - Version 7.7-systemd
|
|
</h4>
|
|
<h3>
|
|
Chapter 6. Installing Basic System Software
|
|
</h3>
|
|
<ul>
|
|
<li class="prev">
|
|
<a accesskey="p" href="gawk.html" title="Gawk-4.1.1">Prev</a>
|
|
<p>
|
|
Gawk-4.1.1
|
|
</p>
|
|
</li>
|
|
<li class="next">
|
|
<a accesskey="n" href="gettext.html" title=
|
|
"Gettext-0.19.4">Next</a>
|
|
<p>
|
|
Gettext-0.19.4
|
|
</p>
|
|
</li>
|
|
<li class="up">
|
|
<a accesskey="u" href="chapter06.html" title=
|
|
"Chapter 6. Installing Basic System Software">Up</a>
|
|
</li>
|
|
<li class="home">
|
|
<a accesskey="h" href="../index.html" title=
|
|
"Linux From Scratch - Version 7.7-systemd">Home</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="wrap" lang="en" xml:lang="en">
|
|
<h1 class="sect1">
|
|
<a id="ch-system-findutils" name="ch-system-findutils"></a>6.48.
|
|
Findutils-4.4.2
|
|
</h1>
|
|
<div class="package" lang="en" xml:lang="en">
|
|
<p>
|
|
The Findutils package contains programs to find files. These
|
|
programs are provided to recursively search through a directory
|
|
tree and to create, maintain, and search a database (often faster
|
|
than the recursive find, but unreliable if the database has not
|
|
been recently updated).
|
|
</p>
|
|
<div class="segmentedlist">
|
|
<div class="seglistitem">
|
|
<div class="seg">
|
|
<strong class="segtitle">Approximate build time:</strong>
|
|
<span class="segbody">0.4 SBU</span>
|
|
</div>
|
|
<div class="seg">
|
|
<strong class="segtitle">Required disk space:</strong>
|
|
<span class="segbody">32 MB</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="installation" lang="en" xml:lang="en">
|
|
<h2 class="sect2">
|
|
6.48.1. Installation of Findutils
|
|
</h2>
|
|
<p>
|
|
Prepare Findutils for compilation:
|
|
</p>
|
|
<pre class="userinput">
|
|
<kbd class=
|
|
"command">./configure --prefix=/usr --localstatedir=/var/lib/locate</kbd>
|
|
</pre>
|
|
<div class="variablelist">
|
|
<p class="title">
|
|
<strong>The meaning of the configure options:</strong>
|
|
</p>
|
|
<dl class="variablelist">
|
|
<dt>
|
|
<span class="term"><em class=
|
|
"parameter"><code>--localstatedir</code></em></span>
|
|
</dt>
|
|
<dd>
|
|
<p>
|
|
This option changes the location of the <span class=
|
|
"command"><strong>locate</strong></span> database to be in
|
|
<code class="filename">/var/lib/locate</code>, which is
|
|
FHS-compliant.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<p>
|
|
Compile the package:
|
|
</p>
|
|
<pre class="userinput">
|
|
<kbd class="command">make</kbd>
|
|
</pre>
|
|
<p>
|
|
To test the results, issue:
|
|
</p>
|
|
<pre class="userinput">
|
|
<kbd class="command">make check</kbd>
|
|
</pre>
|
|
<p>
|
|
Install the package:
|
|
</p>
|
|
<pre class="userinput">
|
|
<kbd class="command">make install</kbd>
|
|
</pre>
|
|
<p>
|
|
Some packages in BLFS and beyond expect the <span class=
|
|
"command"><strong>find</strong></span> program in <code class=
|
|
"filename">/bin</code>, so make sure it's placed there:
|
|
</p>
|
|
<pre class="userinput">
|
|
<kbd class="command">mv -v /usr/bin/find /bin
|
|
sed -i 's|find:=${BINDIR}|find:=/bin|' /usr/bin/updatedb</kbd>
|
|
</pre>
|
|
</div>
|
|
<div class="content" lang="en" xml:lang="en">
|
|
<h2 class="sect2">
|
|
<a id="contents-findutils" name="contents-findutils"></a>6.48.2.
|
|
Contents of Findutils
|
|
</h2>
|
|
<div class="segmentedlist">
|
|
<div class="seglistitem">
|
|
<div class="seg">
|
|
<strong class="segtitle">Installed programs:</strong>
|
|
<span class="segbody">bigram, code, find, frcode, locate,
|
|
oldfind, updatedb, and xargs</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="variablelist">
|
|
<h3>
|
|
Short Descriptions
|
|
</h3>
|
|
<table border="0" class="variablelist">
|
|
<colgroup>
|
|
<col align="left" valign="top" />
|
|
<col />
|
|
</colgroup>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a id="bigram" name="bigram"></a><span class=
|
|
"term"><span class=
|
|
"command"><strong>bigram</strong></span></span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Was formerly used to produce <span class=
|
|
"command"><strong>locate</strong></span> databases
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a id="code" name="code"></a><span class=
|
|
"term"><span class=
|
|
"command"><strong>code</strong></span></span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Was formerly used to produce <span class=
|
|
"command"><strong>locate</strong></span> databases; it is
|
|
the ancestor of <span class=
|
|
"command"><strong>frcode</strong></span>
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a id="find" name="find"></a><span class=
|
|
"term"><span class=
|
|
"command"><strong>find</strong></span></span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Searches given directory trees for files matching the
|
|
specified criteria
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a id="frcode" name="frcode"></a><span class=
|
|
"term"><span class=
|
|
"command"><strong>frcode</strong></span></span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Is called by <span class=
|
|
"command"><strong>updatedb</strong></span> to compress
|
|
the list of file names; it uses front-compression,
|
|
reducing the database size by a factor of four to five
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a id="locate" name="locate"></a><span class=
|
|
"term"><span class=
|
|
"command"><strong>locate</strong></span></span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Searches through a database of file names and reports the
|
|
names that contain a given string or match a given
|
|
pattern
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a id="oldfind" name="oldfind"></a><span class=
|
|
"term"><span class=
|
|
"command"><strong>oldfind</strong></span></span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Older version of find, using a different algorithm
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a id="updatedb" name="updatedb"></a><span class=
|
|
"term"><span class=
|
|
"command"><strong>updatedb</strong></span></span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Updates the <span class=
|
|
"command"><strong>locate</strong></span> database; it
|
|
scans the entire file system (including other file
|
|
systems that are currently mounted, unless told not to)
|
|
and puts every file name it finds into the database
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<p>
|
|
<a id="xargs" name="xargs"></a><span class=
|
|
"term"><span class=
|
|
"command"><strong>xargs</strong></span></span>
|
|
</p>
|
|
</td>
|
|
<td>
|
|
<p>
|
|
Can be used to apply a given command to a list of files
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="navfooter">
|
|
<ul>
|
|
<li class="prev">
|
|
<a accesskey="p" href="gawk.html" title="Gawk-4.1.1">Prev</a>
|
|
<p>
|
|
Gawk-4.1.1
|
|
</p>
|
|
</li>
|
|
<li class="next">
|
|
<a accesskey="n" href="gettext.html" title=
|
|
"Gettext-0.19.4">Next</a>
|
|
<p>
|
|
Gettext-0.19.4
|
|
</p>
|
|
</li>
|
|
<li class="up">
|
|
<a accesskey="u" href="chapter06.html" title=
|
|
"Chapter 6. Installing Basic System Software">Up</a>
|
|
</li>
|
|
<li class="home">
|
|
<a accesskey="h" href="../index.html" title=
|
|
"Linux From Scratch - Version 7.7-systemd">Home</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|