linux - 为什么 tar 允许不带连字符的选项?

标签 linux command-line-interface tar manpage

通读 man tar 时,您会发现 tar 命令在任何地方都没有连字符。为什么 tar 允许以下两个命令有效:

tar c .
tar -c .

最佳答案

3.3 The Three Option Styles

There are three styles for writing operations and options to the command line invoking tar. The different styles were developed at different times during the history of tar. These styles will be presented below, from the most recent to the oldest.

https://www.gnu.org/software/tar/manual/html_section/tar_21.html

关于linux - 为什么 tar 允许不带连字符的选项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40728111/

相关文章:

java - 如何从 mvn、gradle 等 Maven 项目构建 CLI?

windows - 如何更改git目录分隔符?

ruby - 从 linux 中的 top 命令获取实时值到我的程序中

c - pthread 唤醒执行

command-line - Mac Terminal-如何在CLI上启动Android Virtual Device Manager?

linux - 从 Ant tar 任务打包的 .tar.gz 中提取时对包含非拉丁字符的文件名进行编码

linux - Bash 命令根据添加日期每天归档文件

java - 如何从远程存档文件中提取单个文件?

linux - apache linux 中的 LDAP 身份验证

windows - Microsoft Windows 的终端多路复用器 - GNU Screen 或 tmux 的安装程序