手册页概要中的大括号是什么意思?

手册页概要中的大括号是什么意思?

这个问题对概要语法有很好的答案,但没有有关大括号“{}”的任何信息: 了解联机帮助页中的概要

tar 手册页中的示例

姓名

 tar -- manipulate tape archives

概要

 tar [bundled-flags <args>] [<file> | <pattern> ...]
 tar {-c} [options] [files | directories]
 tar {-r | -u} -f archive-file [options] [files | directories]
 tar {-t | -x} [options] [patterns]

我认为大括号的意思是“如果您在大括号中使用这些选项,那么这就是用法的格式”。有人能证实吗?

答案1

啊,我刚刚重新阅读了描述,我相信我的假设是正确的,这些是那些彼此不同的选项的具体用法:

第一个概要表格显示“捆绑”选项词

其他概要形式显示了首选用法

DESCRIPTION
     tar creates and manipulates streaming archive files.  This implementation can extract from tar, pax, cpio, zip, jar, ar, xar, rpm, 7-zip,
     and ISO 9660 cdrom images and can create tar, pax, cpio, ar, zip, 7-zip, and shar archives.

     The first synopsis form shows a ``bundled'' option word.  This usage is provided for compatibility with historical implementations.  See
     COMPATIBILITY below for details.

     The other synopsis forms show the preferred usage.  The first option to tar is a mode indicator from the following list:
     -c      Create a new archive containing the specified items.  The long option form is --create.
     -r      Like -c, but new entries are appended to the archive.  Note that this only works on uncompressed archives stored in regular files.
             The -f option is required.  The long option form is --append.
     -t      List archive contents to stdout.  The long option form is --list.
     -u      Like -r, but new entries are added only if they have a modification date newer than the corresponding entry in the archive.  Note
             that this only works on uncompressed archives stored in regular files.  The -f option is required.  The long form is --update.
     -x      Extract to disk from the archive.  If a file with the same name appears more than once in the archive, each copy will be extracted,
             with later copies overwriting (replacing) earlier copies.  The long option form is --extract.

     In -c, -r, or -u mode, each specified file or directory is added to the archive in the order specified on the command line.  By default,
     the contents of each directory are also archived.

     In extract or list mode, the entire command line is read and parsed before the archive is opened.  The pathnames or patterns on the command
     line indicate which items in the archive should be processed.  Patterns are shell-style globbing patterns as documented in tcsh(1).

相关内容