小编khi*_*kho的帖子

tar 及其关键字母:它是错误还是功能?

我想问一下这两个命令的区别(即只有它们的选项顺序不同):

  1. tar -zxvf foo.tar.gz
  2. tar -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 不需要这个限制,或者有吗?!因为在我看来开关应该是免费订购的。

linux command-line tar

18
推荐指数
3
解决办法
2924
查看次数

标签 统计

command-line ×1

linux ×1

tar ×1