【问题标题】:What does the ellipsis (...) mean in man pages手册页中的省略号 (...) 是什么意思
【发布时间】:2014-09-21 17:36:52
【问题描述】:

我正在阅读 ln 手册页并看到以下 SYNOPSIS。

ln [-Ffhinsv] source_file ... target_dir

上面的符号...是什么意思?

【问题讨论】:

  • 您可以拥有多个 source-file,例如ln file1 file2 file3 target-dir/
  • 这个省略号(...) 是一个通用符号,用于表明可以有几种类型与前面提到的类型相关!

标签: linux manpage


【解决方案1】:

这意味着一个可重复的参数 (source_file)。

来自man man

The following conventions apply to the SYNOPSIS section and can be used
as a guide in other sections.

bold text          type exactly as shown.
italic text        replace with appropriate argument.
[-abc]             any or all arguments within [ ] are optional.
-a|-b              options delimited by | cannot be used together.

argument ...       argument is repeatable.
[expression] ...   entire expression within [ ] is repeatable.

根据手册页,像这样调用ln 将为目标目录中的所有源文件创建链接,例如ln file1 file2 file3 target-dir/.

【讨论】:

    最近更新 更多