unpack
嚯嚯 发表于 2020-07-22 16:46浏览次数:
在类似Unix的操作系统上,unpack是用于扩展由pack实用程序压缩的文件的实用程序。由于历史原因,此处在此进行了记录。
注:该包和解压公用事业不再使用的现代系统。如果你需要的工作是与压缩文件包,使用gzip的工具,它可以自动检测并解压缩文件使用pack压缩。
On Unix-like operating systems, the unpack was the utility used to expand a file that was compressed with the pack utility. It is documented here for historical reasons.
Note: The pack and unpack utilities are no longer used on modern systems. If you need to work with files compressed with pack, use the gzip utility, which can automatically detect and decompress files that use pack compression.
目录:
1 unpack 运行系统环境
2 unpack 描述
3 unpack 语法
4 unpack 示例
unpack 运行系统环境
unpack 描述
在unpack命令扩展由创建的文件包。对于命令中指定的每个文件,将搜索名为file .z的文件(如果file以.z结尾,则仅搜索文件)。如果此文件似乎是打包文件,则将其替换为扩展版本。新文件的名称后带有.z后缀,并且具有与打包文件相同的访问模式,访问和修改日期以及所有者。
unpack返回的值是无法解压缩的文件数。可能由于与pcat中相同的原因以及以下原因而导致失败:
-
具有“unpack”名称的文件已经存在;
-
解压缩的文件无法创建;
-
文件名(不包括.z扩展名)超过14 个字节。(这向您展示了过时的解压缩方法!)
The unpack command expands files created by pack. For each file specified in the command, a search is made for a file called file.z (or just file, if file ends in .z). If this file appears to be a packed file, it is replaced by its expanded version. The new file has the .z suffix stripped from its name, and has the same access modes, access and modification dates, and owner as those of the packed file.
unpack returns a value that is the number of files it was unable to unpack. Failure may occur for the same reasons that it may in pcat, as well as for the following:
-
a file with the "unpacked" name already exists;
-
the unpacked file cannot be created;
-
the file name (excluding the .z extension) has more than 14 bytes. (this shows you how antiquated unpack is!)
unpack 语法
unpack 示例
unpack myfile.txt.z
将文件
myfile.txt.z解压缩到文件
myfile.txt中。
unpack myfile.txt.z
Unpack the file
myfile.txt.z into the file
myfile.txt.