.\" This file documents the GNU utilities for finding files that match .\" certain criteria and performing various operations on them. .\" .\" Copyright (C) 1994 Free Software Foundation, Inc. .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of .\" this manual under the conditions for verbatim copying, provided that .\" the entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Permission is granted to copy and distribute translations of this .\" manual into another language, under the above conditions for modified .\" versions, except that this permission notice may be stated in a .\" translation approved by the Foundation. .\" .\" Japanese Version Copyright (c) 1997 NAKANO Takeo all rights reserved. .\" Translated Thu May 11 1997 by NAKANO Takeo .\" .TH LOCATE 1 \" -*- nroff -*- .SH 名前 locate \- ファイル名データベースからパターンに合うものを表示する .SH 書式 .B locate [\-d path] [\-\-database=path] [\-\-version] [\-\-help] pattern... .SH 説明 このマニュアルページは GNU 版 .BR locate の使い方を説明したものである。 .B locate は与えられたパターンそれぞれに対して、 一つまたは複数のファイル名データベースを検索し、 パターンを含むファイル名を表示する。 パターンにはシェルで用いるメタキャラクタ (`*', `?' 及び `[]') を用いることができる。 メタキャラクタは `/' や `.' を特別扱いしない。 従って `foo*bar' というパターンは `foo3/bar' というファイル名にマッチするし、 `*duck*' というパターンは `lake/.ducky' にマッチする。 メタキャラクタを含んだパターンは、 シェルによって展開されないように引用符で囲む必要がある。 .PP パターンが \(em メタキャラクタを含まない \(em 通常の文字列である場合には、 .B locate はその文字列を (部分的にでも、またどんな位置にでも) 含むファイル名をすべて表示する。 もしパターンがメタキャラクタを含む場合には、 .B locate はパターンに正確に合うファイル名のみを表示する。 従って、通常メタキャラクタを含むパターンには、 最初と最後に `*' をつけておくと良い。 ただしファイル名の先頭または最後に意識的にマッチさせたい場合はこの限りではない。 .PP ファイル名データベースは、 最後に更新された時点において、 システムに存在していたファイルのリストからなっている。 システム管理者はデフォルトで用いるデータベースのファイル名や更新の頻度、 またどのディレクトリの情報をデータベースに入れるかなどを選択することができる。 .BR updatedb (1) を見よ。 .SH オプション .TP .I "\-d \fIpath\fP, \-\-database=\fIpath\fP" デフォルトのファイル名データベースの代わりに、 \fIpath\fP にあるものを探す。 \fIpath\fP はデータベースファイル名のリスト (コロン区切り) である。 検索するデータベースファイルのリストを指定するには、環境変数 .B LOCATE_PATH を利用することもできる。 このオプションと環境変数が両方とも指定された場合には、 オプションの方が優先される。 .P ファイル名データベースのフォーマットは GNU 版 .B find 及び .B locate のバージョン 4.0 から変更された。この変更によって、 バイトオーダーの異なるマシンの間で データベースを共有することが可能になった。この版の .B locate は、古い版の GNU .B locate や Unix 版 .B locate 及び .BR find 向けに作成されたデータベースを自動的に認識できる。 .TP .I "\-\-help" .B locate のオプションに対する短い説明を表示して終了する。 .TP .I "\-\-version" .B locate のバージョンを表示して終了する。 .SH 環境変数 .TP .B LOCATE_PATH コロンによって区切られた検索するデータベースのリスト。 .SH 関連項目 .BR find (1L), .BR locatedb (5L), .BR updatedb (1L), .BR xargs (1L) .br .B Finding Files (on-line in Info, or printed)