'\" t .\" Man page for mandb .\" .\" Copyright (C) 1994, 1995, Graeme W. Wilford. (Wilf.) .\" Copyright (C) 2001-2019 Colin Watson. .\" .\" You may distribute under the terms of the GNU General Public .\" License as specified in the file docs/COPYING.GPLv2 that comes with the .\" man-db distribution. .\" .\" Tue Apr 26 12:56:44 BST 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) .\" .pc "" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH MANDB 8 2026-11-16 2.13.3 手動分頁工具 .SH 名稱 mandb \- 建立或更新手動分頁索引快取 .SH 語法 \fBmandb\fP [\|\fB\-dqsucpt?V\fP\|] [\|\fB\-C\fP \fIfile\fP\|] [\|\fImanpath\fP\|] .br \fBmandb\fP [\|\fB\-dqsut\fP\|] [\|\fB\-C\fP \fIfile\fP\|] \fB\-f\fP \fIfilename\fP\ .\|.\|. .SH 描述 \fBmandb\fP 用於初始化或手動更新 \fBindex\fP 資料庫快取。快取包含與手動分頁系統目前狀態相關的資訊,其中儲存的資訊供 man\-db 工具用來增強其速度和功能。 在建立或更新 \fBindex\fP 時,\fBmandb\fP 會警告不良的 ROFF .so 要求、偽造的手動分頁檔案名稱以及無法剖析 \fBwhatis\fP 的手動分頁。 向 \fBmandb\fP 提供可選的以冒號分隔的路徑將覆寫內部系統手動分頁階層搜尋路徑,這是從 man\-db 設定檔中找到的資訊判斷的。 .SH 資料庫快取 \fBmandb\fP 可以編譯以支援以下任何一種資料庫類型。 .TS tab (@); l l l. 名稱@非同步@檔案名稱 _ Berkeley db@是@\fIindex.bt\fP GNU gdbm@是@\fIindex.db\fP UNIX ndbm@否@\fIindex.(dir|pag)\fP .TE 支援非同步更新的資料庫類型提供了增強的速度,代價是在不正常終止的情況下可能發生在不正常終止的情況下可能發生毀損。在不正常的情況下,可能需要重新執行 \fBmandb\fP 並使用 \fB\-c\fP 選項從頭重新建立資料庫。 .SH 選項 .TP .if !'po4a'hide' .BR \-d ", " \-\-debug 列印除錯資訊。 .TP .if !'po4a'hide' .BR \-q ", " \-\-quiet 不產生警告。 .TP .if !'po4a'hide' .BR \-s ", " \-\-no-straycats 不要浪費時間尋找或新增有關流浪貓的資訊到資料庫。 .TP .if !'po4a'hide' .BR \-p ", " \-\-no-purge 不要浪費時間檢查已刪除的手動分頁並從資料庫中清除它們。 .TP .if !'po4a'hide' .BR \-c ", " \-\-create 預設情況下,\fBmandb\fP 會嘗試更新任何先前建立的資料庫。如果資料庫不存在,它會建立一個。此選項強制 \fBmandb\fP 刪除先前的資料庫並從頭重新建立,並暗示 \fB\-\-no\-purge.\fP 如果資料庫毀損或未來引入新的資料庫儲存方案,這可能是必要的。 .TP .if !'po4a'hide' .BR \-u ", " \-\-user-db 只建立使用者資料庫,即使具有寫入權限以建立系統資料庫。 .TP .if !'po4a'hide' .BR \-t ", " \-\-test 對階層搜尋路徑中的手動分頁執行正確性檢查。使用此選項時,\fBmandb\fP 將不會更改現有資料庫。 .TP .if !'po4a'hide' .BR \-f ", " \-\-filename 只更新指定檔案名稱的項目。此選項不供一般使用;它在 \fBman\fP 以 \fBMAN_DB_UPDATES\fP 選項編譯時使用,並行現頁面過期時。它暗示 \fB\-p\fP 並停用 \fB\-c\fP 和 \fB\-s\fP。 .TP \fB\-C\ \fP\fIfile\fP,\ \fB\-\-config\-file=\fP\fIfile\fP 使用此使用者設定檔,而非預設的 \fI\(ti/.manpath\fP。 .TP .if !'po4a'hide' .BR \-? ", " \-\-help 顯示用法訊息,然後退出。 .TP .if !'po4a'hide' .B \-\-usage 列印簡短用法訊息並退出。 .TP .if !'po4a'hide' .BR \-V ", " \-\-version 顯示版本,然後退出。 .SH 結束狀態 .TP .if !'po4a'hide' .B 0 程式執行成功。 .TP .if !'po4a'hide' .B 1 用法、語法或設定檔錯誤。 .TP .if !'po4a'hide' .B 2 操作錯誤。 .TP .if !'po4a'hide' .B 3 子處理程序失敗。 .SH 診斷 在資料庫建置期間可能發出以下警告訊息。 .TP \fB: whatis parse for page(sec) failed\fP 嘗試從指定的 擷取 whatis 行失敗。這通常是由於撰寫不佳的手動分頁,但如果發出許多此類訊息,則系統可能包含與 man\-db whatis 剖析器不相容的非標準手動分頁。請參閱 \fBlexgrog\fP(1) 中的 \fBWHATIS PARSING\fP 區段以取得更多資訊。 .TP \fB: is a dangling symlink\fP 不存在但被符號連結參考。通常會發出進一步的診斷以識別有問題的連結的 。 .TP \fB: bad symlink or ROFF `.so' request\fP 要不是符號連結,就是包含對不存在檔案的 ROFF 引入要求。 .TP \fB: ignoring bogus filename\fP 可能是也可能不是有效的手動分頁,但其名稱無效。這通常是由於將包含區段延伸 的手動分頁放入手動分頁區段 中。 .TP \fB: competing extensions\fP 萬用字元 不是唯一的。這通常是由於同時存在相同手動分頁的壓縮和非壓縮版本。除最近以外的所有版本都會被忽略。 .SH 檔案 .TP .if !'po4a'hide' .I /etc/man_db.conf man\-db 設定檔。 .TP .if !'po4a'hide' .I /var/cache/man/index.(bt|db|dir|pag) 符合 FHS 的全域 \fIindex\fP 資料庫快取。 .PP 資料庫快取的舊位置包括: .TP .if !'po4a'hide' .I /usr/man/index.(bt|db|dir|pag) 傳統的全域 \fIindex\fP 資料庫快取。 .TP .if !'po4a'hide' .I /var/catman/index.(bt|db|dir|pag) 替代或符合 FSSTND 的全域 \fIindex\fP 資料庫快取。 .SH 請參閱 .if !'po4a'hide' .BR lexgrog (1), .if !'po4a'hide' .BR man (1), .if !'po4a'hide' .BR manpath (5), .if !'po4a'hide' .BR catman (8) .PP 原先在手動分頁中的 \fBWHATIS PARSING\fP 區段現在是 \fBlexgrog\fP(1) 的一部分。 .SH 作者 .nf .if !'po4a'hide' Wilf.\& (G.Wilford@ee.surrey.ac.uk). .if !'po4a'hide' Fabrizio Polacco (fpolacco@debian.org). .if !'po4a'hide' Colin Watson (cjwatson@debian.org). .fi .SH 錯誤 .if !'po4a'hide' https://gitlab.com/man-db/man-db/\-/issues .br .if !'po4a'hide' https://savannah.nongnu.org/bugs/?group=man\-db