为什么`man -k cron` 会为某些结果显示`vixie-cron (rpm)`,我该如何阅读这些页面?

Ste*_*ski 6 man rpm rhel

我试图在 RedHat 系统上找出有关cron 和 /etc/cron.d/ 的一些详细信息。具有讽刺意味的是,我的答案可以在vixie-cron-*.src.rpm 中查看,但其手册页cronvixie-cronRPM提供的文本不匹配。

如果我在 MANPATH 中搜索关键字cron,它会显示一些结果,例如vixie-cron (rpm). 这个(rpm)标签是什么意思,为什么系统上没有安装这些联机帮助页,我可以查看这些联机帮助页吗?

$ man -k cron
/etc/anacrontab [anacrontab] (5)  - configuration file for anacron
anacron              (8)  - runs commands periodically
anacron             (rpm) - A cron-like program that can run jobs lost during downtime.
cron                 (8)  - daemon to execute scheduled commands (ISC Cron V4.1)
crontab              (1)  - maintain crontab files for individual users (ISC Cron V4.1)
crontab              (1p)  - schedule periodic background work
crontab              (5)  - tables for driving cron (ISC Cron V4.1)
crontabs            (rpm) - Root crontab files used to schedule the execution of programs.
vixie-cron          (rpm) - The Vixie cron daemon for executing specified programs at set times.
Run Code Online (Sandbox Code Playgroud)

请注意,没有页面vixie-cron,并且 vixie-cron 包实际上没有提供任何名为vixie-cron

$ man vixie-cron
No manual entry for vixie-cron
$ rpm -q --whatprovides /usr/bin/crontab
vixie-cron-4.1-77.el5_4.1
$ rpm -q --list vixie-cron
/etc/cron.d
/etc/pam.d/crond
/etc/rc.d/init.d/crond
/etc/sysconfig/crond
/usr/bin/crontab
/usr/sbin/crond
/usr/share/man/man1/crontab.1.gz
/usr/share/man/man5/crontab.5.gz
/usr/share/man/man8/cron.8.gz
/usr/share/man/man8/crond.8.gz
/var/spool/cron
Run Code Online (Sandbox Code Playgroud)

msw*_*msw 2

该命令man -k针对预编译的数据库而不是手册页本身进行查询。

我怀疑数据库中可能已man mandb为实际不存在的页面创建了条目(详细信息请参阅)。我对 RPM 机制不太熟悉,不知道这是如何发生的。

同样,给定手册页可以声称存在的部分也有相当大的灵活性。例如,在我的系统上man Carp声称位于“3perl”部分,其中底层文件存储在.../man3/Carp.3perl.gz. 命令

man Carp
man -s 3 Carp
man -s 3perl Carp
Run Code Online (Sandbox Code Playgroud)

全部产生相同的页面,同时man -s 3junk Carp抱怨没有这样的条目。

您可能会发现mlocate(又名locate)对于按名称查找文件很有用。我认为它可用于 RedHat,因为编辑@redhat.com 被认为是作者。