echo(1)的(1)是代表什么?
大家好,初学 Linux 命令,我在使用 whatis echo 命令时,有点不明白返回结果里的一个小细节:$ whatis echo
echo (1) - display a line of text
echo (3x) - curses input options
我不明白,这里 (1) 和 (3x) 指的是什么?
当我使用 man echo 时,进入的手册里显示的是 echo(1),那么这个 echo(3x) 又是什么呢?
谢谢大家! 输入
man man
可以看到 man 一共有 9 个 section
echo (1)
表示这个echo是属于 section 1
另一个例子是 printf
这个既是shell命令又是C语言库函数
你输入 main printf 的时候 man 怎么知道你需要哪个
shell命令在section 1
库函数在section 3
man 会选择数字最小的那个,这个例子就是 section 1
也就是你输入
man printf
相当于输入
man 1 printf
你可以输入
man 3 printf
来查看库函数
echo (3x) 就是 section 3x
我这边没有查到这个
1 Executable programs or shell commands
2 System calls (functions provided by the kernel)
3 Library calls (functions within program libraries)
4 Special files (usually found in /dev)
5 File formats and conventions, e.g. /etc/passwd
6 Games
7 Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7)
8 System administration commands (usually only for root)
9 Kernel routines
纠正一下
默认不是从最小的开始
Theorderof sections to search may be overridden by the environment variable $MANSECT or by the SECTION di‐
rective in /etc/man_db.conf.By default it is as follows:
1 1p n l 8 3 3p 0 0p 2 5 4 9 6 7 人造人 发表于 2022-1-26 19:20
纠正一下
默认不是从最小的开始
哦哦哦!原来如此!!谢谢!!
我试了试,我这里可以 man 3 echo, 不过并没有 man 3 printf 就很奇妙hhh
再次感谢回答! 人造人 发表于 2022-1-26 19:20
纠正一下
默认不是从最小的开始
哦我这里 man 3 echo 进去是 curs_inopts(3X)
页:
[1]