使用grep命令搜索man pape

时间:2014-03-12 04:05:32

标签: linux

虽然手册页有很多信息,但我需要一点点。例如,objdump -f kernel.o,但我忘记了标志'-f'的功能。

我尝试了但是失败了。

man objdump | grep -e '*.(\-)f.*'

错误消息如下:

<standard input>:161: warning [p 1, 5.5i]: can't break line
<standard input>:594: warning [p 6, 6.5i, div `an-div', 0.0i]: can't break line

如何使用grep搜索手册页?

1 个答案:

答案 0 :(得分:0)

$ man objdump | grep -e "-f"
<standard input>:161: warning [p 1, 5.5i]: can't break line
<standard input>:590: warning [p 6, 6.5i, div `an-div', 0.0i]: can't break line
               [-f|--file-headers]
               [-F|--file-offsets]
               [--file-start-context]
               [-s|--full-contents]
       -a,-d,-D,-e,-f,-g,-G,-h,-H,-p,-P,-r,-R,-s,-S,-t,-T,-V,-x must be given.
       -f
       --file-headers
       --file-offsets
       --file-start-context
       --full-contents
           all of -a -f -h -p -r -t.

这就是你想要的吗?