1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
5 <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
9 <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" />
10 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
11 <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
12 "text/css" media="print" />
14 <body class="lfs" id="lfs-7.2">
15 <div class="navheader">
17 Linux From Scratch - Version 7.2
24 <a accesskey="p" href="gawk.html" title="Gawk-4.0.1">前のページ</a>
30 <a accesskey="n" href="flex.html" title="Flex-2.5.37">次のページ</a>
36 <a accesskey="u" href="chapter06.html" title=
37 "第6章 基本的なソフトウェアのインストール">上に戻る</a>
40 <a accesskey="h" href="../index.html" title=
41 "Linux From Scratch - Version 7.2">ホーム</a>
45 <div class="wrap" lang="ja" xml:lang="ja">
47 <a id="ch-system-findutils" name="ch-system-findutils"></a>6.42.
50 <div class="package" lang="ja" xml:lang="ja">
52 Findutils パッケージはファイル検索を行うプログラムを提供します。
53 このプログラムはディレクトリツリーを再帰的に検索したり、データベースの生成、保守、検索を行います。
54 (データベースによる検索は再帰的検索に比べて処理速度は速いものですが、データベースが最新のものに更新されていない場合は信頼できない結果となります。)
56 <div class="segmentedlist">
57 <div class="seglistitem">
59 <strong class="segtitle">概算ビルド時間:</strong> <span class=
60 "segbody">0.4 SBU</span>
63 <strong class="segtitle">必要ディスク容量:</strong> <span class=
64 "segbody">29 MB</span>
69 <div class="installation" lang="ja" xml:lang="ja">
71 6.42.1. Findutils のインストール
74 Findutils をコンパイルするための準備をします。
76 <pre class="userinput">
77 <kbd class="command">./configure --prefix=/usr \
78 --libexecdir=/usr/lib/findutils \
79 --localstatedir=/var/lib/locate</kbd>
81 <div class="variablelist">
83 <b>configure オプションの意味:</b>
87 <span class="term"><em class=
88 "parameter"><code>--localstatedir</code></em></span>
92 <span class="command"><strong>locate</strong></span>
93 データベースの場所を FHS コンプライアンスが定めているディレクトリ <code class=
94 "filename">/var/lib/locate</code> に変更します。
102 <pre class="userinput">
103 <kbd class="command">make</kbd>
106 コンパイル結果をテストするなら以下を実行します。
108 <pre class="userinput">
109 <kbd class="command">make check</kbd>
114 <pre class="userinput">
115 <kbd class="command">make install</kbd>
118 LFS ブートスクリプトパッケージでは、いくつかのスクリプトが <span class=
119 "command"><strong>find</strong></span> を利用しています。 <code class=
120 "filename">/usr</code>
121 ディレクトリはブート処理の初めでは認識できないため、このプログラムはルートパーティションに置く必要があります。 同じく
122 <span class="command"><strong>updatedb</strong></span>
123 スクリプトは明示的なパスを修正する必要があります。
125 <pre class="userinput">
126 <kbd class="command">mv -v /usr/bin/find /bin
127 sed -i 's/find:=${BINDIR}/find:=\/bin/' /usr/bin/updatedb</kbd>
130 <div class="content" lang="ja" xml:lang="ja">
132 <a id="contents-findutils" name="contents-findutils"></a>6.42.2.
135 <div class="segmentedlist">
136 <div class="seglistitem">
138 <strong class="segtitle">インストールプログラム:</strong> <span class=
139 "segbody">bigram, code, find, frcode, locate, oldfind,
140 updatedb, xargs</span>
143 <strong class="segtitle">インストールディレクトリ:</strong> <span class=
144 "segbody">/usr/lib/findutils</span>
148 <div class="variablelist">
153 <col align="left" valign="top" />
158 <a id="bigram" name="bigram"></a><span class=
160 "command"><strong>bigram</strong></span></span>
165 かつて利用されていたコマンドで <span class=
166 "command"><strong>locate</strong></span> データベースを生成します。
173 <a id="code" name="code"></a><span class=
175 "command"><strong>code</strong></span></span>
180 かつて利用されていたコマンドで <span class=
181 "command"><strong>locate</strong></span> データベースを生成します。
182 これは <span class="command"><strong>frcode</strong></span>
190 <a id="find" name="find"></a><span class=
192 "command"><strong>find</strong></span></span>
197 指定された条件に合致するファイルを、指定されたディレクトリツリー内から検索します。
204 <a id="frcode" name="frcode"></a><span class=
206 "command"><strong>frcode</strong></span></span>
211 <span class="command"><strong>updatedb</strong></span>
212 コマンドから呼び出され、ファイル名の一覧を圧縮します。 これは前置圧縮 (front-compression)
213 を行うもので、データベースサイズを 1/4 から 1/5 に減らします。
220 <a id="locate" name="locate"></a><span class=
222 "command"><strong>locate</strong></span></span>
227 ファイル名データベースを検索して、指定された文字列を含むもの、または検索パターンに合致するものを表示します。
234 <a id="oldfind" name="oldfind"></a><span class=
236 "command"><strong>oldfind</strong></span></span>
241 find の古い版であり、find とは異なるアルゴリズムを用いています。
248 <a id="updatedb" name="updatedb"></a><span class=
250 "command"><strong>updatedb</strong></span></span>
255 <span class="command"><strong>locate</strong></span>
256 データベースを更新します。 これはすべてのファイルシステムを検索します。
257 (検索非対象とする設定がない限りは、マウントされているすべてのファイルシステムを対象とします。)
258 そして検索されたファイル名をデータベースに追加します。
265 <a id="xargs" name="xargs"></a><span class=
267 "command"><strong>xargs</strong></span></span>
272 指定されたコマンドに対してファイル名の一覧を受け渡して実行します。
281 <div class="navfooter">
284 <a accesskey="p" href="gawk.html" title="Gawk-4.0.1">前のページ</a>
290 <a accesskey="n" href="flex.html" title="Flex-2.5.37">次のページ</a>
296 <a accesskey="u" href="chapter06.html" title=
297 "第6章 基本的なソフトウェアのインストール">上に戻る</a>
300 <a accesskey="h" href="../index.html" title=
301 "Linux From Scratch - Version 7.2">ホーム</a>