たとえば、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のドキュメント用です。