mandb(8) マニュアルページのインデックスキャッシュを作成、更新する

書式

mandb [-dqsucpt?V] [-C file] [manpath]
mandb [-dqsut] [-C file] -f filename ...

説明

mandb is used to initialise or manually update index database caches that are usually maintained by man. The caches contain information relevant to the current state of the manual page system and the information stored within them is used by the man-db utilities to enhance their speed and functionality.

When creating or updating an index, mandb will warn of bad ROFF .so requests, bogus manual page filenames and manual pages from which the whatis cannot be parsed.

Supplying mandb with an optional colon-delimited path will override the internal system manual page hierarchy search path, determined from information found within the man-db configuration file.

データベースキャッシュ

mandb は次のうち一つのデータベースタイプをサポートするようにコンパイルされます。

名前

非同期
ファイル名

Berkeley db
二分木

index.bt
GNU gdbm v >= 1.6
ハッシュ

index.db
GNU gdbm v < 1.6
ハッシュ
×
index.db
UNIX ndbm
ハッシュ
×
index.(dir|pag)

Those database types that support asynchronous updates provide enhanced speed at the cost of possible corruption in the event of unusual termination. In an unusual case where this has occurred, it may be necessary to rerun mandb with the -c option to re-create the databases from scratch.

オプション

-d, --debug
デバッグ情報を表示します。
-q, --quiet
警告を表示しません。
-s, --no-straycats
Do not spend time looking for or adding information to the databases regarding stray cats.
-p, --no-purge
削除されたマニュアルページの検索と、それに伴うデータベースのデータ削除を行いません。
-c, --create
デフォルトでは、 mandb ま作成済みのデータベースを更新します。データベースが存在しない場合、データベースを作成します。このオプションを使用した場合、 mandb はこれまでに作成されたデータベースを削除し、新規にデータベースを作成します。また、暗黙的に --no-purge が指定されます。これの作業は、データベースが破損したか、新機能によりデータベースのスキーマが変更された場合に必要となります。
-u, --user-db
ユーザー用データベースの作成のみ行います。システム用データベースの作成権限があったとしても、システム用データベースの作成は行いません。
-t, --test
検索パス内の階層にあるマニュアルページとデータベース情報が正確に合っているかの確認をします。このオプションを使用した場合、 mandb は既存のデータベースの変更は行いません。
-f, --filename
指定したファイル名に関するデータベースの項目のみ更新します。このオプションは一般的には使用しません。 MAN_DB_UPDATES オプションを有効にしてコンパイルした場合、ページが古いかどうかを確認するために、 man の内部で使用されます。このオプションは、暗黙的に、 -p を有効にし、 -c および -s を無効にします。
-C file--config-file=file
デフォルトの ~/.manpath ではなく指定したユーザ設定ファイルを使用します。
-?, --help
使用法を表示して終了します。
--usage
Print a short usage message and exit.
-V, --version
バージョン情報を表示して終了します。

終了ステータス

0
プログラムが正常に実行されました。
1
使用法、構文、または設定ファイルのエラーです。
2
操作のエラーです。
3
子プロセスが異常終了しました。

診断

データベースを構築中に次の警告メッセージが表示されることがあります。
<filename>: whatis parse for page(sec) failed
An attempt to extract whatis line(s) from the given <filename> failed. This is usually due to a poorly written manual page, but if many such messages are emitted it is likely that the system contains non-standard manual pages which are incompatible with the man-db whatis parser. See the WHATIS PARSING section in lexgrog(1) for more information.
<ファイル名> はシンボリックリンクが切れています
<ファイル名>が参照しているシンボリックリンクの先が存在しません。通常、<ファイル名>の参照しているリンク先を特定するための追加の診断メッセージが表示されます。
<ファイル名>: : シンボリックリンクまたは ROFF の `.so' 要求に誤りがあります
シンボリックリンクの参照先または ROFF のインクルード (.so) 要求に含まれる<ファイル名>が存在しません。
<ファイル名>: おかしなファイル名を無視しています
<ファイル名>を持つマニュアルページが有効であるか無効であるかにかかわらず、名前が無効です。これは通常、マニュアルページがセクション拡張名 <x> であるのに、マニュアルページセクション <y> に配置されている時に発生します。
<filename_mask>: competing extensions
The wildcard <filename_mask> is not unique. This is usually caused by the existence of both a compressed and uncompressed version of the same manual page. All but the most recent are ignored.

ファイル

/etc/manpath.config
man-db 設定ファイルです。
/var/cache/man/index.(bt|db|dir|pag)
FHS 準拠の大域インデックス型データベースキャッシュです。

過去に使用されていたデータベースキャッシュの位置:

/usr/man/index.(bt|db|dir|pag)
伝統的な大域インデックス型データベースキャッシュです。
/var/catman/index.(bt|db|dir|pag)
代替または FSSTND 準拠の大域インデックス型データベースキャッシュです。

著者

Wilf. ([email protected]).Fabrizio Polacco ([email protected]).Colin Watson ([email protected]).