.\" Man page for whatis .\" .\" Copyright (C), 1994, 1995, Graeme W. Wilford. (Wilf.) .\" .\" 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. .\" .\" Sat Oct 29 13:09:31 GMT 1994 Wilf. (G.Wilford@ee.surrey.ac.uk) .\" .pc "" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH WHATIS 1 2026-11-16 2.13.3 手動分頁工具 .SH 名稱 whatis \- 顯示單行手動分頁描述 .SH 語法 \fBwhatis\fP [\|\fB\-dlv?V\fP\|] [\|\fB\-r\fP\||\|\fB\-w\fP\|] [\|\fB\-s\fP \fIlist\fP\|] [\|\fB\-m\fP \fIsystem\fP\|[\|,.\|.\|.\|]\|] [\|\fB\-M\fP \fIpath\fP\|] [\|\fB\-L\fP \fIlocale\fP\|] [\|\fB\-C\fP \fIfile\fP\|] \fIname\fP \&.\|.\|. .SH 描述 每個手動分頁都有一個簡短描述。\fBwhatis\fP 搜尋手動分頁名稱並顯示任何相符 \fIname\fP 的手動分頁描述。 \fIname\fP 可能包含萬用字元 (\fB\-w\fP) 或是正規表示法 (\fB\-r\fP)。使用這些選項時,可能需要對 \fIname\fP 加上引號或跳脫 (\e) 特殊字元,以防止殼層解讀它們。 \fBindex\fP 資料庫在搜尋期間使用,並由 \fBmandb\fP 程式更新。根據您的安裝方式,這可能由週期性的 cron 工作執行,或者在安裝新手動分頁後可能需要手動執行。要從相對的 \fBindex\fP 資料庫產生舊式文字 \fBwhatis\fP 資料庫,請發出命令: \fBwhatis \-M\fP \fImanpath\fP \fB\-w '*' | sort >\fP \fImanpath/whatis\fP 其中 \fImanpath\fP 是手動分頁階層,例如 \fI/usr/man\fP。 .SH 選項 .TP .if !'po4a'hide' .BR \-d ", " \-\-debug 列印除錯資訊。 .TP .if !'po4a'hide' .BR \-v ", " \-\-verbose 列印詳盡警告訊息。 .TP .if !'po4a'hide' .BR \-r ", " \-\-regex 將每個 \fIname\fP 解讀為正規表示法。如果 \fIname\fP 符合頁面名稱的任何部分,就會進行相符。由於資料庫搜尋的特性,此選項會導致 \fBwhatis\fP 稍慢。 .TP .if !'po4a'hide' .BR \-w ", " \-\-wildcard 將每個 \fIname\fP 解讀為包含殼層樣式萬用字元的模式。要進行相符,展開的 \fIname\fP 必須符合整個頁面名稱。由於資料庫搜尋的特性,此選項會導致 \fBwhatis\fP 稍慢。 .TP .if !'po4a'hide' .BR \-l ", " \-\-long 不要將輸出裁剪到終端寬度。通常輸出會被截斷到終端寬度,以避免格式不佳的 \fBNAME\fP 區段產生難看的結果。 .TP \fB\-s\fP \fIlist\/\fP, \fB\-\-sections=\fP\fIlist\/\fP, \fB\-\-section=\fP\fIlist\fP 只搜尋指定的手動分頁區段。\fIlist\fP 是以冒號或逗號分隔的區段清單。如果 \fIlist\fP 中的項目是簡單的區段,例如「3」,則顯示的描述清單將包含區段「3」、「3perl」、「3x」等中的頁面;而如果 \fIlist\fP 中的項目有延伸,例如「3perl」,則清單只包含手動分頁區段中該確切部分的頁面。 .TP \fB\-m\fP \fIsystem\fP\|[\|,.\|.\|.\|]\|, \fB\-\-systems=\fP\fIsystem\fP\|[\|,.\|.\|.\|] 如果此系統可以存取其他作業系統的手動分頁名稱,則可以使用此選項存取。要搜尋 NewOS 的手動分頁名稱,請使用選項 \fB\-m\fP \fBNewOS\fP。 指定的 \fIsystem\fP 可以是逗號分隔的作業系統名稱的組合。要包含原生作業系統的手動分頁名稱搜尋,請在引數字串中包含系統名稱 \fBman\fP。此選項將覆寫 $\fBSYSTEM\fP 環境變數。 .TP \fB\-M\ \fP\fIpath\fP,\ \fB\-\-manpath=\fP\fIpath\fP 指定一組以冒號分隔的替代說明頁階層進行搜尋。預設情況下,\fBwhatis\fP 使用 $\fBMANPATH\fP 環境變數,除非它是空的或未設定,在這種情況下它將根據您的 $\fBPATH\fP 環境變數確定適當的手動分頁路徑。此選項覆寫 $\fBMANPATH\fP 的內容。 .TP \fB\-L\ \fP\fIlocale\fP,\ \fB\-\-locale=\fP\fIlocale\fP \fBwhatis\fP 通常會透過呼叫 C 函式 \fBsetlocale\fP(3) 來判斷您的當前語系,它會詢問各種環境變數,可能包括 $\fBLC_MESSAGES\fP 和 $\fBLANG\fP。要暫時覆寫判斷的值,請使用此選項將 \fIlocale\fP 字串直接提供給 \fBwhatis\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 16 未找到任何符合指定條件的項目。 .SH 環境 .TP .if !'po4a'hide' .B SYSTEM 如果已設定 $\fBSYSTEM\fP,其效果與將指定為 \fB\-m\fP 選項的引數相同。 .TP .if !'po4a'hide' .B MANPATH 如果已設定 $\fBMANPATH\fP,其值會被解讀為要使用的以冒號分隔的說明頁階層搜尋路徑。 請參閱 \fBmanpath\fP(5) 的 \fBSEARCH PATH\fP 區段,了解此環境變數的預設行為和處理方式的詳細資訊。 .TP .if !'po4a'hide' .B MANWIDTH 如果已設定 $\fBMANWIDTH\fP,其值會被用作終端寬度(請參閱 \fB\-\-long\fP 選項)。如果未設定,終端寬度將使用 $\fBCOLUMNS\fP 的值來計算,如果可用則使用 \fBioctl\fP(2),或者如果全部失敗則退回使用 80 個字元。 .SH 檔案 .TP .if !'po4a'hide' .I /usr/share/man/index.(bt|db|dir|pag) 傳統的全域 \fIindex\fP 資料庫快取。 .TP .if !'po4a'hide' .I /var/cache/man/index.(bt|db|dir|pag) 符合 FHS 的全域 \fIindex\fP 資料庫快取。 .TP .if !'po4a'hide' .I /usr/share/man/\|.\|.\|.\|/whatis 傳統的 \fBwhatis\fP 文字資料庫。 .SH 請參閱 .if !'po4a'hide' .BR apropos (1), .if !'po4a'hide' .BR man (1), .if !'po4a'hide' .BR mandb (8) .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