manページをインストールする

% man 2 write

とやったら、一件も表示されなかったので、システムコール関連の man ページが入っている「/usr/share/man/man2/」以下を見てみたら、案の定、ディレクトリが空になっていた。

% ls /usr/share/man/man2


システムコール関連の manページを一気に入れてくれるパッケージが無いかなーと

% yum list | grep man- | less

のようにして探してみたら「man-pages」というのがあったので入れてみた。

% sudo yum install man-pages


man-pagesパッケージのインストール後、再度

% man 2 read

とすると、今度はちゃんとマニュアルが表示された。
念のため「/usr/share/man/man2」も確認すると、「hoge.2.gz」という形式のマニュアルが大量にインストールされていた。

% ls /usr/share/man/man2


最後に、「man -k」で検索できるようにするため、whatisデータベースも更新しておく。(結構時間がかかる)

% sudo /usr/sbin/makewhatis

% man -k file | grep read
Archive::Zip::MemberRead (3pm)  - A wrapper that lets you read Zip archive members as if they were files
_llseek [llseek]     (2)  - reposition read/write file offset
aio_read             (3p)  - asynchronous read from a file (REALTIME)
elfutils-libelf     (rpm) - Library to read and write ELF files.
fc-cat               (1)  - read font information cache files
fts_read [fts]       (3)  - traverse a file hierarchy
lseek                (2)  - reposition read/write file offset
lseek                (3p)  - move the read/write file offset
lseek64              (3)  - reposition 64-bit read/write file offset
pread                (2)  - read from or write to a file descriptor at a given offset
pread [read]         (3p)  - read from a file
pwrite [pread]       (2)  - read from or write to a file descriptor at a given offset
read                 (2)  - read from a file descriptor
read                 (3p)  - read from a file
readahead            (2)  - perform file readahead into page cache
readelf              (1)  - Displays information about ELF files
readlinkat           (2)  - read value of a symbolic link relative to a directory file descriptor
readprofile          (1)  - a tool to read kernel profiling information
scr_dump [curs_scr_dump] (3x)  - read (write) a curses screen from (to) a file
scr_init [curs_scr_dump] (3x)  - read (write) a curses screen from (to) a file
scr_restore [curs_scr_dump] (3x)  - read (write) a curses screen from (to) a file
scr_set [curs_scr_dump] (3x)  - read (write) a curses screen from (to) a file
tee                  (1)  - read from standard input and write to standard output and files
vfs_fake_perms       (8)  - enable read only Roaming Profiles
vol_id               (8)  - probe filesystem type and read label and uuid

うん、read (2)が検索されてるのでOK。