我试图完成一篇关于适当命令。当我运行该apropos
命令时,它会列出如下内容:
fahim@Fahim:~$ apropos delete
argz_delete (3) - functions to handle an argz list
crlutil (1) - List, generate, modify, or delete CRLs within the NSS ...
DELETE (7) - delete rows of a table
delete_module (2) - unload a kernel module
flatpak-remote-delete (1) - Delete a remote repository
git-branch (1) - List, create, or delete branches
git-replace (1) - Create, list, delete refs to replace objects
git-symbolic-ref (1) - Read, modify and delete symbolic refs
git-tag (1) - Create, list, delete or verify a tag object signed wit...
groupdel (8) - delete a group
在每个列出的命令之后,括号中都有一个数字。这个数字是什么意思?它有什么用呢?
编辑:我已经在手册页上看到了答案。为了检查所有数字是否在 1 到 8 之间,我尝试了这个命令,一些结果是:
fahim@Fahim:~$ apropos a
YAML::LibYAML (3pm) - Perl YAML Serialization using XS and libyaml
x509 (1ssl) - Certificate display and signing utility
x509v3_config (5ssl) - X509 V3 certificate extension configuration format
X25519 (7ssl) - EVP_PKEY X25519 and X448 support
关于数字的答案是有道理的,但是这些 3pm、1ssl、5ssl、7ssl 呢?
答案1
下表显示了手册的章节号以及其包含的页面类型。
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 [Non standard]
我从执行“man man”命令中删除了上面的文本。