manpath
スポンサーリンク
何するコマンド?
マニュアル(「man」コマンドで表示されるやつ)の置いてある場所を設定・表示するときに使うコマンド
書き方
manpath [オプション]
オプション
| オプション | 説明 |
|---|---|
| -q | 警告メッセージを表示しない Do not issue warnings. |
| --quiet | 警告メッセージを表示しない Do not issue warnings. |
| -d | デバッグメッセージを表示する Print debugging information. |
| --debug | デバッグメッセージを表示する Print debugging information. |
| -c | Produce a catpath as opposed to a manpath. Once the manpath is determined, each path element is converted to its relative catpath. |
| --catpath | Produce a catpath as opposed to a manpath. Once the manpath is determined, each path element is converted to its relative catpath. |
| -g | Produce a manpath consisting of all paths named as `global' within the man-db configuration file. |
| --global | Produce a manpath consisting of all paths named as `global' within the man-db configuration file. |
| -m 【システム】 | If this system has access to other operating system's manual hierarchies, this option can be used to include them in the output of manpath. To include NewOS's manual page hierarchies use the option -m NewOS. The system specified can be a combination of comma delimited operating system names. To include the native operating system's manual page hierarchies, the system name man must be included in the argument string. This option will override the $SYSTEM environment variable. |
| -systems=【システム】 | If this system has access to other operating system's manual hierarchies, this option can be used to include them in the output of manpath. To include NewOS's manual page hierarchies use the option -m NewOS. The system specified can be a combination of comma delimited operating system names. To include the native operating system's manual page hierarchies, the system name man must be included in the argument string. This option will override the $SYSTEM environment variable. |
| -C【ファイル】 | 指定した設定ファイルを使う Use this user configuration file rather than the default of ~/.manpath. |
| --config-file=【ファイル】 | 指定した設定ファイルを使う Use this user configuration file rather than the default of ~/.manpath. |
| -? | ヘルプを表示する Print a help message and exit. |
| --help | ヘルプを表示する Print a help message and exit. |
| --usage | 簡易ヘルプを表示する Print a short usage message and exit. |
| -V | バージョン情報を表示する Display version information. |
| --version | バージョン情報を表示する Display version information. |
補足事項
オプションを何も指定しないで
manpath
を実行すると「/etc/manpath.config」や「/etc/man_db.conf」の内容に従ってマニュアルの場所が設定され、その結果が表示されます。
※私の環境(CentOS 7)には「/etc/man_db.conf」が ありました。「/etc/manpath.config」はありませんでした。
つまり「-C」オプションを指定して
manpath -C /etc/man_db.conf
を実行したのと同じ結果になります。
試しに
manpath
を実行したところ、私の環境(CentOS 7)では以下の結果が表示されました。
/usr/local/share/man:/usr/share/man
どうやら「/usr/local/share/man」と「/usr/share/man」がマニュアルの置き場所として指定されているようです。
「-C」オプションは、使う設定ファイルを指定するオプションです。
試しに、以下の内容の「hoge.conf」を用意しました。
MANDATORY_MANPATH /etc
この状態で
manpath -C hoge.conf
を実行したところ
/usr/local/share/man:/usr/share/man:/etc
と表示されました。
「hoge.conf」に記述した「/etc」が追加されていますね。
