LoginSignup
0
0

More than 3 years have passed since last update.

manpageをgrepして探す

Posted at

Linuxコマンドが思い出せないとき

コマンドがどうしても思い出せないときがあります。
manpageのキーワードだけ覚えているとき、下のコマンドを使います。

$ man -K -w -W keyword

自分は面倒なのでスクリプトファイル ~/bin/mangrep にして使用しています。

#!/bin/bash
man -K -w -W $*
$ mangrep performance
/usr/share/man/ja/man1/nmap.1.gz
/usr/share/man/ja/man1/dig.1.gz
/usr/share/man/ja/man1/dnskeygen.1.gz
/usr/share/man/ja/man1/dnsquery.1.gz
:

あと良く使うコマンド

$ apropos

面倒なのでalias a=aproposとして、

$ a printf
asprintf (3)         - 文字列を割り当ててそれに出力する
dprintf (3)          - ファイルディスクリプターに文字出力する
fprintf (3)          - 指定された書式に変換して出力を行う
fwprintf (3)         - ワイド文字を フォーマットして出力する
:

のように使います。

参考文献

以上

0
0
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
0
0