で始まるコマンドのすべてのマニュアルページを見つけたいと思いますwh
。しかし、なぜ次のキーワードが機能しないのか理解できません。
man -f "wh"
また、入れたら
man chmod
マニュアルページにはchmod
「symbol」という単語があるので、次のように入力しました。
man -f "symbolic"
ただし、chmod
コマンドは結果に表示されません。
簡単に言えば、単語内の内容でコマンドやコマンドの説明を検索または検索する方法は?マニュアルページを取得したら、文字を使用して/
特定の単語を見つける方法を知っていますが、検索語を使用してすべてのマニュアルページを検索したいと思います。
ベストアンサー1
このスイッチを使用すると、その名前または簡単な説明を含むすべてのマニュアルページを-k
見つけることができます。wh
次に、で始まるすべてをgrepしますwh
。このコマンドはapropos
と同じですman -k
。
はい
$ man -k wh | grep "^wh"
what (1p) - identify SCCS files (DEVELOPMENT)
whatis (1) - display manual page descriptions
whereis (1) - locate the binary, source, and manual page files for a command
which (1) - shows the full path of (shell) commands.
while (n) - Execute script repeatedly as long as a condition is met
whiptail (1) - display dialog boxes from shell scripts
whirlwindwarp (6x) - crazy moving stars
whline (3x) - create curses borders, horizontal and vertical lines
whline_set (3x) - create curses borders or lines using complex characters and renditions
who (1) - show who is logged on
who (1p) - display who is on the system
whoami (1) - print effective userid
whois (1) - client for the whois service
マニュアルページ検索
フルテキスト検索でマニュアルページを検索することにした場合は、この-K
スイッチを使用できます。大文字のKです。
はい
$ man -w -K symbolic | head -10
/usr/local/share/man/man1/mimeopen.1
/usr/local/share/man/man1/mimetype.1
/usr/local/share/man/man1/ptksh.1
/usr/share/man/man1/as.1.gz
/usr/share/man/man1/atop.1.gz
/usr/share/man/man1/atopsar.1.gz
/usr/share/man/man1/attr.1.gz
/usr/share/man/man1/autoreconf.1.gz
/usr/share/man/man1/bakefilize.1.gz
/usr/share/man/man1/bash.1.gz
ただし、この方法はマニュアルページの名前や簡単な説明を提供しません。マニュアルページが保存されているファイルの実際の名前(通常はコマンド名)のみが表示されます。