uncompress (从压缩的存档中提取文件)

嚯嚯 发表于 2020-07-15 18:11
浏览次数:
在手机上阅读

在类Unix操作系统,uncompress命令解压缩的文件已被压缩使用compress命令。 本文档介绍了Linux版本的uncompress。

查看英文版

目录

1 uncompress 运行系统环境

2 uncompress 描述

3 uncompress 语法

4 uncompress 示例

uncompress 运行系统环境

Linux

uncompress 描述

解压缩工具,他们一直在使用压缩之后将文件恢复到原始状态的压缩实用程序。如果未指定文件,则标准输入将解压缩为标准输出。

使用compress压缩的文件通常具有扩展名 .Z,而uncompress查找并识别具有该扩展名的文件为压缩文件。

该实用程序支持解压缩compress生成的任何文件。对于在其他系统上由compress生成的文件,uncompress支持9到16位压缩(请参阅下面的-b)。

uncompress utility will restore files to their original state after they have been compressed using the compress utility. If no files are specified, the standard input will be uncompressed to the standard output.

compress typically have the extension .Z, and uncompress looks for and recognizes files with that extension as compressed files.

compress. For files produced by compress on other systems, uncompress supports 9- to 16-bit compression (see -b, below).

查看英文版

查看中文版

uncompress 语法

uncompress [-cfv] [file...]
选件
-c 写入标准输出;没有文件更改,没有.Z文件创建。zcat的行为与“ uncompress -c ” 的行为相同。
-f 压缩时,-f选项会强制压缩文件,即使它实际上并没有减小文件的大小或相应的file.Z文件已经存在。如果未提供-f选项,并且该进程未在后台运行,则提示您验证是否应覆盖现有的file.Z文件。解压缩时,不提示覆盖文件。如果未提供-f选项,并且该进程未在后台运行,则提示您验证是否应覆盖现有文件。如果标准输入不是端子,并且未给出-f,则将诊断消息写入标准错误,并以大于0的状态退出。
-v 详细。将与每个文件的减少或扩展百分比有关的任何消息写入标准错误。
-b bits 设置常见子字符串代码的上限(以位为单位)。位必须在9到16之间(默认值为16)。减少位数将导致文件压缩得更大,文件更少。
file 一个路径名的文件被压缩的压缩,解压缩通过解压缩,或者其压缩的形式被写到标准输出ZCAT。如果将文件指定为破折号(“ - ”),或者未指定文件,则将使用标准输入。
退出状态

退出时,uncompress返回以下状态:

0 操作成功。
1 发生错误。
2 一个或多个文件未压缩,因为它们会增加大小(并且未指定-f选项)。
>2 发生错误。
uncompress [-cfv] [file...]
Options
-c Writes to the standard output; no files are changed and no .Z files are created. The behavior of zcat is identical to that of "uncompress -c".
-f When compressing, the -f option forces compression of files, even if it does not actually reduce the size of the files, or if corresponding file.Z files already exist. If the -f option is not given, and the process is not running in the background, prompts to verify whether an existing file.Z file should be overwritten. When uncompressing, does not prompt for overwriting files. If the -f option is not given, and the process is not running in the background, prompts to verify whether an existing file should be overwritten. If the standard input is not a terminal and -f is not given, writes a diagnostic message to standard error and exits with a status greater than 0.
-v Verbose. Writes to standard error any messages concerning the percentage reduction or expansion of each file.
-b bits Sets the upper limit (in bits) for common substring codes. Bits must be between 9 and 16 (16 is the default). Lowering the number of bits will result in larger, less-compressed files.
file A path name of a file to be compressed by compress, uncompressed by uncompress, or whose uncompressed form is written to standard out by zcat. If file is specified as a dash ("-"), or if no file is specified, the standard input will be used.
Exit Status

uncompress returns the following status upon exit:

0 Operation successful.
1 An error occurred.
2 One or more files were not compressed because they would have increased in size (and the -f option was not specified).
>2 An error occurred.

查看英文版

查看中文版

uncompress 示例

uncompress myfile.txt.Z

解压缩文件myfile.txt.Z。

请注意,默认情况下假定.Z扩展名。如果相反,该命令为

uncompress myfile.txt

... 解压缩仍会搜索myfile.txt.Z并解压缩。

uncompress myfile.txt.Z

Uncompress the file myfile.txt.Z.

Note that the .Z extension is assumed by default. If instead this command were given as

uncompress myfile.txt

...uncompress would still search for myfile.txt.Z, and uncompress it.

查看英文版

查看中文版

其他命令行

userdel | usermod | ul | umask | unalias | uname | unhash | uniq | until | unlink | unpack | uptime | unzip | useradd |

如此好文,分享给朋友
发表评论
验证码:
评论列表
共0条