LoginSignup
3
3

More than 5 years have passed since last update.

linux > あるキーワードが載っているmanページを見つける > man -K キーワード

Last updated at Posted at 2015-01-28

動作環境

CentOS 6.5

あるキーワード(例としてh_name)が載っているmanのページを見つけたい時、以下のように実行する

man -K h_name

実行後、一つ一つのgzファイルに対して以下のように聞かれる。

/usr/share/man/man1/perllocale.1.gz? [ynq]
  • y :そのmanページを見る
  • n : そのmanページはスキップする
  • q : 中止

のようだ。入力せずにEnterだけ押すと'n'と同じ動作となった。

manページに入ってからは/h_nameのようにして、該当箇所に飛んで、nで次検索、Shift+nで前検索、qでmanから抜ける。

manページから抜けた後は、それ以降のファイルについて同じ質問が繰り返される。



上記で一度見たmanページを選んで再度見るには
- /usr/share/man/man1/perllocale.1.gzの場合はman 1 perllocale
- /usr/share/man/man3p/write.3p.gzの場合はman 3p write
のようにページ(1や3p)を指定すればいい。



h_nameを含む構造体の説明をmanページで見つけようとして、こういう機能があることを知った。
3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3