我想问一下这两个命令的区别(即只有它们的选项顺序不同):
tar -zxvf foo.tar.gztar -zfxv foo.tar.gz第一个运行完美,但第二个说:
tar: You must specify one of the `-Acdtrux' or `--test-label' options
Try `tar --help' or `tar --usage' for more information.
Run Code Online (Sandbox Code Playgroud)
而焦油--test-label和-zfxv说:
tar (child): xv: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
Run Code Online (Sandbox Code Playgroud)
然后我查看了 tar 手册,发现里面的所有示例最终都使用了 switch -f!!
AFAICT 不需要这个限制,或者有吗?!因为在我看来开关应该是免费订购的。