如何解压缩(打开)gz 文件
打开 gz 文件的程序
对于 windows 操作系统:
- peazip
- winrar
- corel winzip
- 7-zip
- file viewer plus
对于 macos:
- corel winzip mac
- incredible bee archiver
- apple archive utility
- smith micro stuffit deluxe mac 16
对于基于 linux 的操作系统:
- gzip
- xarchive
- ark
- peazip
在基于 linux 的操作系统中解压缩 gz 文件的步骤。运行以下命令将gz文件解压到原始状态并删除原始.gz文件
gzip -d file-name.gz
提取 tar.gz 文件的步骤。
运行以下命令以在基于 linux 的操作系统(如 ubuntu、linux mint、centos、fedora os、pop os、elementary os、redhat 和其他 linux 发行版)中提取 tar.gz 文件:
tar -xf archive-name.tar.gz
使用 gunzip 命令解压 gz 文件:
gunzip < filename.tar.gz > filename.tar
如何在不提取的情况下查看存档文件夹的内容
运行以下命令,在 linux 中查看 tar.gz 文件的内容,无需解压。
tar -tvf filename.tar.gz
在 windows 10/windows 11 上使用 tar 提取 .tar.gz、.tgz、.gz 压缩包
通过以下步骤在 windows 11 上使用 tar 提取 .tar.gz、.tgz、.gz 以及 .zip 文件。
以管理员权限打开命令并键入以下命令以使用 tar 在 windows 11 上提取文件。
tar -xvzf c:\path\to\file\file.tar.gz -c c:\path\to\folder-name\extraction
在 linux on windows (wsl) 上使用 tar 提取 .tar.gz、.tgz、.gz 压缩包
运行以下命令在 linux on windows (linux on wsl) 上提取 .gz 文件
sudo tar -xvzf /mnt/c/path/to/tar-file/desktop/filename.tar.gz -c /mnt/c/path/to/destination/folder
到此这篇关于linux解压缩(打开)gz文件的命令详解的文章就介绍到这了,更多相关linux解压缩gz文件内容请搜索代码网以前的文章或继续浏览下面的相关文章希望大家以后多多支持代码网!
发表评论