Linux whatis??whatis database??ü????????
???????????? ???????[ 2015/10/28 13:40:30 ] ??????????????
????????man????????????????????????man –f ??man –k ??????????????????????Щ?е???man???????????Щ??????????????????????????????????????whatis??????????????
???????man????????????
????[chengmo@centos5 ~]$ man -h
????...
????f:same as whatis(1)
????...
????#??????????whatis???????
????[chengmo@centos5 ~]$ man whatis
????#?????????
????#whatis - search the whatis database for complete words.
????#??????whatis??????????
????#The whatis database is created using the command /usr/sbin/makewhatis.
????#???滹???whatis????? ?????/usr/bin/makewhatis??????
???????whatis???????????makewhatis??????whatis??????????????
????makewhatis????????????????
????[chengmo@centos5 ~]$ man makewhatis
????#?????
????makewhatis reads all the manual pages contained in the given sections of manpath or the preformatted pages con-tained in the given sections of catpath. For each page?? it writes a line in the whatis database; each line consists of the name of the page and a short description?? separated by a dash. The description is extracted using the content of the NAME section of the manual page.
????#?????????makewhatis ???????????·?????????Χ?????????????????????????????????????????У????л????????????name?????????????
???????????????????????????????????????????д?????(a line) ???????????????????????????????????????????????????????????????????п???whatis?????????????????????
??????????whatis????????
????[chengmo@centos5 ~]$ type whatis
????whatis is /usr/bin/whatis
????#????·?????????????
????[chengmo@centos5 ~]$ vi /usr/bin/whatis
????1
????#!/bin/sh
????2
????#
????3
????# apropos -- search the whatis database for keywords.
????4
????# whatis -- idem?? but match only commands (as whole words).
????……
????#?????sh?????
????#?????
????#grep “?????“ /var/cache/man/whatis
????#??????????????????/var/cache/man/whatis?????????whatis ?????
????[chengmo@centos5 ~]$ head /var/cache/man/whatis
????$notes_name [Module::Build::Notes] (3pm) - Configuration for $module_name
????*_unlocked [unlocked_stdio] (3) - non-locking stdio functions
????#whatis????????????????????????????????
????whatis???????????????????
????[chengmo@centos5 ~]$ ls -al /var/cache/man/whatis
????-rw-r--r-- 1 root root 1057156 10-27 04:06 /var/cache/man/whatis
????#?????????????賿4?????????????????????????????????cron??????
????[chengmo@centos5 ~]$ cat /etc/crontab
????SHELL=/bin/bash
????PATH=/sbin:/bin:/usr/sbin:/usr/bin
????MAILTO=root
????HOME=/
????# run-parts
????01 * * * * root run-parts /etc/cron.hourly
????02 4 * * * root run-parts /etc/cron.daily
????22 4 * * 0 root run-parts /etc/cron.weekly
????42 4 1 * * root run-parts /etc/cron.monthly
??????run-parts???????/etc/cron.daily??????????
????[chengmo@centos5 ~]$ cd /etc/cron.daily/
????[chengmo@centos5 cron.daily]$ cat makewhatis.cron
????#!/bin/bash
????LOCKFILE=/var/lock/makewhatis.lock
????makewhatis -u -w
????……
?????????????????????????е?
?????????????man???????????????????????????????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11