利用方法: updatedb [オプション]... mlocate データベースを更新します。 -f, --add-prunefs FS 同じ FS を除外する -n, --add-prunenames NAMES 同じ NAMES を除外する -e, --add-prunepaths PATHS 同じ PATHS を除外する -U, --database-root PATH データベース中の保存するサブツリー (省略値 "/") -h, --help このヘルプを印刷する -o, --output FILE 更新するデータベース (省略値 `/var/lib/mlocate/mlocate.db') --prune-bind-mounts FLAG bind マウントを除外する (省略値 "no") --prunefs FS データベースから除外するファイルシステム --prunenames NAMES データベースから除外する辞書名 --prunepaths PATHS データベースから除外するパス -l, --require-visibility FLAG ファイルを報告する前に可視性をチェックする (省略値 "yes") -v, --verbose 見つかったファイルのバスを印刷する -V, --version バージョン情報を印刷する 設定はファイル`/etc/updatedb.conf' から読み込んだ値を省略値とします。 バグを mitr@redhat.com へ報告してください。
Usage: updatedb [OPTION]... Update a mlocate database. -f, --add-prunefs FS omit also FS -n, --add-prunenames NAMES omit also NAMES -e, --add-prunepaths PATHS omit also PATHS -U, --database-root PATH the subtree to store in database (default "/") -h, --help print this help -o, --output FILE database to update (default `/var/lib/mlocate/mlocate.db') --prune-bind-mounts FLAG omit bind mounts (default "no") --prunefs FS filesystems to omit from database --prunenames NAMES directory names to omit from database --prunepaths PATHS paths to omit from database -l, --require-visibility FLAG check visibility before reporting files (default "yes") -v, --verbose print paths of files as they are found -V, --version print version information The configuration defaults to values read from `/etc/updatedb.conf'. Report bugs to mitr@redhat.com.
UPDATEDB(1L) UPDATEDB(1L) 名前 updatedb - ファイル名データベースを更新する 書式 updatedb [options] 説明 こ の マ ニ ュアルページは GNU 版 updatedb について記述したものである。 updatedb は GNU 版 locate で用いるファイル名データベースを更新するた め に 用いられる。ファイル名データベースには、最後に更新された時点において 、特定のディレクトリ以下に存在していたファイルのリスト情報が入ってい る 。 デフォルトのデータベースのファイル名は locate と updatedb が設定・イ ンストールされたときに決定される。データベースの更新頻度と、どのディ レ ク トリの内容をデータベースにエントリとして追加するかは updatedb を実行 させる頻度と実行時の引き数によって決まる。 ネットワーク環境では、データベースをそれぞれのファイルシステムのルー ト に 作成し、そこにそのファイルシステムのエントリを持たせるようにすると良 い。そして各々のファイルシステムにおいては updatedb を (そのファイル シ ス テムをローカルディスクに持っている) ファイルサーバで実行するようにす れば、ネットワークの余分なトラフィックを防ぐことができる。ユー ザ ー は locate に検索させるデータベースを環境変数やコマンドラインから指定できる (locate(1L) を見よ)。データベースを結合することはできない。 ファイル名データベースのフォーマットは GNU 版 find および locate のバー ジョン 4.0 から変更され、バイトオーダーの違うマシン間でもデータベースを 共有できるようになった。新しいバージョンの GNU 版 locate は古いデータベ ー スを読むこともできるが、古いバージョンの locate や find に新しい形式 のデータベースを読ませると正しくない結果が表示される。 オプション --localpaths=’path1 path2...’ データベースに取り込むネットワーク以外のディレクトリを指定する。 デフォルトは /。 --netpaths=’path1 path2...’ デ ー タ ベースに取り込むネットワークディレクトリ (NFS, AFS, RFS 等) を指定する。デフォルトではどこも取り込まない。 --prunepaths=’path1 path2...’ データベースに取り込まないディレクトリを明示的に指定する。デフォ ルトは /tmp /usr/tmp /var/tmp /afs。 --output=dbfile 作成するデータベースのファイル名を指定する。デフォルトはシステム によって異なるが、通常は /usr/local/var/locatedb のことが多い。 --netuser=user ネットワークディレクトリを検索するユーザーを指定する。 su(1) が 利用される。デフォルトは daemon。 --old-format 作成するデータベースの形式として、現在の形式ではなく古い形式を用 いる。 --version updatedb のバージョンを表示して終了する。 --help updatedb のオプションに関するまとめを表示して終了する。 関連項目 find(1L), locate(1L), locatedb(5L), xargs(1L) Finding Files (on-line in Info, or printed) UPDATEDB(1L)
updatedb(8) updatedb(8)
NAME
updatedb - update a database for mlocate
SYNOPSIS
updatedb [OPTION]...
DESCRIPTION
updatedb creates or updates a database used by locate(1). If the
database already exists, its data is reused to avoid rereading directo-
ries that have not changed.
updatedb is usually run daily by cron(8) to update the default
database.
EXIT STATUS
updatedb returns with exit status 0 on success, 1 on error.
OPTIONS
The PRUNE_BIND_MOUNTS, PRUNEFS, PRUNENAMES and PRUNEPATHS variables,
which are modified by some of the options, are documented in detail in
updatedb.conf(5).
-f, --add-prunefs FS
Add entries in white-space-separated list FS to PRUNEFS.
-n, --add-prunenames NAMES
Add entries in white-space-separated list NAMES to PRUNENAMES.
-e, --add-prunepaths PATHS
Add entries in white-space-separated list PATHS to PRUNEPATHS.
-U, --database-root PATH
Store only results of scanning the file system subtree rooted at
PATH to the generated database. The whole file system is
scanned by default.
locate(1) outputs entries as absolute path names which don’t
contain symbolic links, regardless of the form of PATH.
--debug-pruning
Write debugging information about pruning decisions to standard
error output.
-h, --help
Write a summary of the available options to standard output and
exit successfully.
-o, --output FILE
Write the database to FILE instead of using the default
database.
--prune-bind-mounts FLAG
Set PRUNE_BIND_MOUNTS to FLAG, overriding the configuration
file.
--prunefs FS
Set PRUNEFS to FS, overriding the configuration file.
--prunenames NAMES
Set PRUNENAMES to NAMES, overriding the configuration file.
--prunepaths PATHS
Set PRUNEPATHS to PATHS, overriding the configuration file.
-l, --require-visibility FLAG
Set the “require file visibility before reporting it” flag in
the generated database to FLAG.
If FLAG is 0 or no, or if the database file is readable by "oth-
ers" or it is not owned by slocate, locate(1) outputs the
database entries even if the user running locate(1) could not
have read the directory necessary to find out the file described
by the database entry.
If FLAG is 1 or yes (the default), locate(1) checks the permis-
sions of parent directories of each entry before reporting it to
the invoking user. To make the file existence truly hidden from
other users, the database group is set to slocate and the
database permissions prohibit reading the database by users
using other means than locate(1), which is set-gid slocate.
Note that the visibility flag is checked only if the database is
owned by slocate and it is not readable by "others".
-v, --verbose
Output path names of files to standard output, as soon as they
are found.
-V, --version
Write information about the version and licence of locate on
standard output and exit successfully.
EXAMPLES
To create a private mlocate database as an user other than root, run
updatedb -l 0 -o db_file -U source_directory
Note that all users that can read db_file can get the complete list of
files in the subtree of source_directory.
FILES
/etc/updatedb.conf
A configuration file. See updatedb.conf(5).
/var/lib/mlocate/mlocate.db
The database updated by default.
SECURITY
Databases built with --require-visibility no allow users to find names
of files and directories of other users, which they would not otherwise
be able to do.
NOTES
The accompanying locate(1) utility was designed to be compatible to
slocate and attempts to be compatible to GNU locate where possible.
This is not the case for updatedb.
AUTHOR
Miloslav Trmac
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa