在tar -zxvf 中-zxvf是什么意思?

时间:2021-05-12 18:31:31

I have seen on many websites commands like this what does the "-zxvf" or the similar commands stand for?

我在很多网站上看到过这样的命令“-zxvf”或类似的命令代表什么?

tar -zxvf <filename>
 tar xvf <filename>

2 个解决方案

#1


74  

  • z means (un)z̲ip.
  • z方法(联合国)z̲ip。
  • x means ex̲tract files from the archive.
  • x意味着̲束交货文件存档。
  • v means print the filenames v̲erbosely.
  • v意味着打印文件名̲erbosely。
  • f means the following argument is a f̱ilename.
  • 意味着下面的参数是一个f̱ilename。

#2


10  

Instead of wading through the description of all the options, you can jump to 3.4.3 Short Options Cross Reference under the info tar command.

您可以在info tar命令下跳转到3.4.3 Short options Cross Reference,而不是详细介绍所有选项。

x means --extract. v means --verbose. f means --file. z means --gzip. You can combine one-letter arguments together, and f takes an argument, the filename. There is something you have to watch out for:

x -提取手段。v——冗长的手段。f意味着——文件。z方法——gzip。可以将一个字母的参数组合在一起,f取一个参数文件名。有件事你得小心:

Short options' letters may be clumped together, but you are not required to do this (as compared to old options; see below). When short options are clumped as a set, use one (single) dash for them all, e.g., ''tar' -cvf'. Only the last option in such a set is allowed to have an argument(1).

短选项的字母可能会聚集在一起,但您不需要这样做(与旧选项相比);见下文)。当短选项集合在一起时,使用一个(单)破折号,例如“tar”-cvf”。只有这样一个集合中的最后一个选项允许有一个参数(1)。


This old way of writing 'tar' options can surprise even experienced users. For example, the two commands:

 tar cfz archive.tar.gz file
 tar -cfz archive.tar.gz file

are quite different. The first example uses 'archive.tar.gz' as the value for option 'f' and recognizes the option 'z'. The second example, however, uses 'z' as the value for option 'f' -- probably not what was intended.

有很大的不同。第一个例子使用的是“archive.tar”。gz'作为选项'f'的值,并识别选项'z'。然而,第二个例子使用“z”作为选项“f”的值——可能不是预期的值。

#1


74  

  • z means (un)z̲ip.
  • z方法(联合国)z̲ip。
  • x means ex̲tract files from the archive.
  • x意味着̲束交货文件存档。
  • v means print the filenames v̲erbosely.
  • v意味着打印文件名̲erbosely。
  • f means the following argument is a f̱ilename.
  • 意味着下面的参数是一个f̱ilename。

#2


10  

Instead of wading through the description of all the options, you can jump to 3.4.3 Short Options Cross Reference under the info tar command.

您可以在info tar命令下跳转到3.4.3 Short options Cross Reference,而不是详细介绍所有选项。

x means --extract. v means --verbose. f means --file. z means --gzip. You can combine one-letter arguments together, and f takes an argument, the filename. There is something you have to watch out for:

x -提取手段。v——冗长的手段。f意味着——文件。z方法——gzip。可以将一个字母的参数组合在一起,f取一个参数文件名。有件事你得小心:

Short options' letters may be clumped together, but you are not required to do this (as compared to old options; see below). When short options are clumped as a set, use one (single) dash for them all, e.g., ''tar' -cvf'. Only the last option in such a set is allowed to have an argument(1).

短选项的字母可能会聚集在一起,但您不需要这样做(与旧选项相比);见下文)。当短选项集合在一起时,使用一个(单)破折号,例如“tar”-cvf”。只有这样一个集合中的最后一个选项允许有一个参数(1)。


This old way of writing 'tar' options can surprise even experienced users. For example, the two commands:

 tar cfz archive.tar.gz file
 tar -cfz archive.tar.gz file

are quite different. The first example uses 'archive.tar.gz' as the value for option 'f' and recognizes the option 'z'. The second example, however, uses 'z' as the value for option 'f' -- probably not what was intended.

有很大的不同。第一个例子使用的是“archive.tar”。gz'作为选项'f'的值,并识别选项'z'。然而,第二个例子使用“z”作为选项“f”的值——可能不是预期的值。