相关疑难解决方法(0)

如何使用手册页来学习如何使用命令?

在研究另一个问题时,我遇到了一个命令

locate something | xargs -I {} bash -c "if [ -d "{}" ]; then echo {}; fi"
Run Code Online (Sandbox Code Playgroud)

我想了解更多。所以我运行man xargs并得到以下输出:

XARGS(1)                    General Commands Manual                   XARGS(1)

NAME
       xargs - build and execute command lines from standard input

SYNOPSIS
       xargs  [-0prtx]  [-E  eof-str] [-e[eof-str]] [--eof[=eof-str]] [--null]
       [-d delimiter] [--delimiter delimiter]  [-I  replace-str]  [-i[replace-
       str]]    [--replace[=replace-str]]   [-l[max-lines]]   [-L   max-lines]
       [--max-lines[=max-lines]] [-n max-args] [--max-args=max-args] [-s  max-
       chars]  [--max-chars=max-chars]  [-P max-procs] [--max-procs=max-procs]
       [--interactive]      [--verbose]      [--exit]      [--no-run-if-empty]
       [--arg-file=file]   [--show-limits]   [--version]   [--help]   [command …
Run Code Online (Sandbox Code Playgroud)

man

95
推荐指数
6
解决办法
2万
查看次数

如何转储手册页?

我怎样才能“cat”一个手册页,就像我会“cat”一个文件来获取内容的转储?

man

62
推荐指数
5
解决办法
3万
查看次数

如何grep看起来像一个选项的模式?

m@m-VirtualBox:~$ man netstat | grep "-t"
grep: invalid option -- 't'
Usage: grep [OPTION]... PATTERNS [FILE]...
Try 'grep --help' for more information.
Run Code Online (Sandbox Code Playgroud)

我不想将-t选项传递给grep. 相反,我想找到有关讨论的手册页的netstat-tnetstat 选项的(如果有。

我认为将-t引号括起来就足以使grep解释为一种模式而不是一种选择,但我错了。

如何做我想做的事?

grep options

3
推荐指数
1
解决办法
228
查看次数

标签 统计

man ×2

grep ×1

options ×1