たとえば、man ls
と入力すると LS(1)
が表示されます 。しかし、man apachectl
と入力すると APACHECTL(8)
が表示されます man cd
と入力すると cd(n)
になってしまいます 。
かっこ内の数字があるとしたら、それはどのような意味があるのでしょうか。
承認された回答:
番号は、そのページのマニュアルのどのセクションからのものに対応しています。 1はユーザーコマンド、8はsysadminのものです。 man自体のmanページ(man man
)それを説明し、標準的なものをリストします:
MANUAL SECTIONS
The standard sections of the manual include:
1 User Commands
2 System Calls
3 C Library Functions
4 Devices and Special Files
5 File Formats and Conventions
6 Games et. al.
7 Miscellanea
8 System Administration tools and Daemons
Distributions customize the manual section to their specifics,
which often include additional sections.
セクションごとにページが異なる特定の用語があります(例:printf
コマンドはセクション1にstdlib
として表示されます 関数はセクション3に表示されます);そのような場合は、セクション番号をman
に渡すことができます ページ名の前で必要なものを選択するか、man -a
を使用します 一致するすべてのページを連続して表示するには:
$ man 1 printf
$ man 3 printf
$ man -a printf
man -k
を使用すると、用語がどのセクションに該当するかがわかります。 (apropos
と同等 指図)。サブストリングの一致も行います(たとえば、sprintf
が表示されます) man -k printf
を実行した場合 )、したがって、^term
を使用する必要があります 制限するには:
$ man -k '^printf'
printf (1) - format and print data
printf (1p) - write formatted output
printf (3) - formatted output conversion
printf (3p) - print formatted output
printf [builtins] (1) - bash built-in commands, see bash(1)
セクションにサブセクションが含まれる場合があることに注意してください(例:p
1p
で および3p
その上)。 p
サブセクションはPOSIX仕様用です。 x
サブセクションはXWindowSystemのドキュメント用です。