如何解压缩filename.tar.gz文件 [英] How to extract filename.tar.gz file

查看:226
本文介绍了如何解压缩filename.tar.gz文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想提取一个名为filename.tar.gz的档案.

I want to extract an archive named filename.tar.gz.

使用tar -xzvf filename.tar.gz不会解压缩文件.它给出了此错误:

Using tar -xzvf filename.tar.gz doesn't extract the file. it is gives this error:

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors

推荐答案

如果file filename.tar.gz给出以下消息:POSIX tar存档, 该档案是tar,而不是GZip档案.

If file filename.tar.gz gives this message: POSIX tar archive, the archive is a tar, not a GZip archive.

不带z的情况下解压缩tar,仅用于压缩(压缩):

Unpack a tar without the z, it is for gzipped (compressed), only:

mv filename.tar.gz filename.tar # optional
tar xvf filename.tar

或尝试使用unp( https://packages.qa.debian.org/u /unp.html ),一个用于解压缩各种存档格式的脚本.

Or try a generic Unpacker like unp (https://packages.qa.debian.org/u/unp.html), a script for unpacking a wide variety of archive formats.

确定文件类型:

$ file ~/Downloads/filename.tbz2
/User/Name/Downloads/filename.tbz2: bzip2 compressed data, block size = 400k

这篇关于如何解压缩filename.tar.gz文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆