manpath【コマンド】
コマンドだよ
UNIX系で使えるよ
「man」コマンドで表示されるマニュアルの置いてある場所を設定、表示するよ
「/etc/manpath.config」や「/etc/man_db.conf」の内容に従って設定されるよ
スポンサーリンク
簡単に書くよ
manpath【コマンド】とは
コンピュータさんに対する命令文(コマンド)のひとつ
であり
「man」コマンドで表示されるやつ(マニュアル)の置いてある場所を設定・表示するときに使うコマンド
です。
詳しく書くよ
「manpath」コマンドは
「man」コマンドで表示されるマニュアルの置き場所を設定・表示するときに使うコマンド
です。
UNIX系(LinuxとかMacとか)で使えます。
書き方は
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」が追加されていますね。
基本的な使い方は、それくらいです。
あとは必要に応じて情報を補完してください。
一言でまとめるよ
まぁ「manpath」ってコマンドが出てきたら「マニュアルの置き場所を設定・表示するときに使うんだな~」と お考えください。
おまけ
■訳してみるよ
「man」は多分「manual(マニュアル)」の略です。
「manual(マニュアル)」の意味は「手動の」とか「説明書」とかです。
「path(パス)」の意味は「小道」とか「散歩道」とか「進路」とか「方針」とかです。
何となく くっつけると
説明書までの小道
となります。
■検索してみる?






