TAR 格式
关于TAR文件的一切
可创建
是
可解压
是
扩展名
.tar
平台
Unix/Linux native, all platforms with software
什么是TAR文件?
A TAR file is an archive format commonly used on Unix and Linux systems. TAR (Tape Archive) was originally designed for tape backup but is now used for general file bundling.
TAR files bundle multiple files into a single archive without compression. They are often combined with compression formats like gzip (.tar.gz or .tgz), bzip2 (.tar.bz2), or xz (.tar.xz).
TAR preserves Unix file metadata including permissions, ownership, timestamps, and symbolic links, making it ideal for Linux software distribution and backups.
7-Zip能打开TAR吗?
7-Zip can create and extract TAR files with full POSIX metadata support (permissions, ownership, symlinks).
7-Zip handles compressed TAR formats transparently: .tar.gz, .tar.bz2, .tar.xz are extracted in a single operation.
7-Zip can create .tar.gz and .tar.xz archives directly, combining TAR bundling with gzip or xz compression.
如何解压TAR文件
Right-click the TAR file
Locate your .tar, .tar.gz, or .tar.xz file in Windows Explorer, right-click it, and navigate to "7-Zip".
Choose extraction option
Select "Extract Here" to extract in the current folder. For .tar.gz files, 7-Zip handles both layers (gzip + tar) automatically.
Access extracted files
Files are extracted with their original directory structure. On Windows, Unix permissions may not be fully applicable.
如何创建TAR压缩包
Select files to archive
Select the file(s) or folder(s) you want to bundle into a TAR archive.
Open the archive dialog
Right-click > 7-Zip > "Add to archive..." and set the format to "tar".
Create compressed TAR (optional)
For compressed archives, set format to "gzip" or "xz" — 7-Zip automatically creates a .tar.gz or .tar.xz file.
Create the archive
Click OK. 7-Zip creates the TAR file (uncompressed) or compressed variant.
如何给TAR加密
TAR format does not support password protection or encryption.
For secure archives, use 7z or ZIP format with AES-256 encryption instead.
Alternatively, encrypt a TAR file by placing it inside a password-protected 7z archive.
TAR 规格
| 扩展名 | .tar |
| 压缩 | None (use .tar.gz or .tar.xz for compression) |
| 加密 | Not supported |
| 平台 | Unix/Linux native, all platforms with software |
| 最大大小 | 8 Exabytes (UStar), unlimited (PAX) |
| 开发者 | Free Software Foundation |
| MIME Type | application/x-tar |
TAR常见错误与解决方案
Cannot extract .tar.gz file
原因: Software doesn't handle dual-layer compression.
解决方案: 7-Zip handles .tar.gz transparently — right-click and extract. If using other software, you may need to extract gzip first, then extract the resulting .tar file.
TAR file extraction shows permission errors on Windows
原因: Windows doesn't support Unix file permissions.
解决方案: This is normal on Windows. The files extract correctly but Unix-specific permissions (like executable bits) don't apply. This doesn't affect file contents.
TAR vs 7Z
| Feature | TAR | 7z |
|---|---|---|
| Compression | None (needs external) | Built-in (LZMA2) |
| Encryption | No | AES-256 |
| POSIX metadata | Yes (full support) | Limited |
| Linux native | Yes | No (needs 7z/p7zip) |
TAR FAQ
What is a TAR file?
A TAR file is an archive format used on Unix/Linux systems. It bundles multiple files into one without compression. TAR files are often compressed with gzip (.tar.gz) or xz (.tar.xz).
Can 7-Zip open TAR files?
Yes. 7-Zip can open and extract TAR, .tar.gz, .tar.bz2, and .tar.xz files on Windows with full POSIX metadata support.
Can 7-Zip create TAR files?
Yes. 7-Zip can create TAR archives and also compressed variants (.tar.gz, .tar.xz). Right-click > 7-Zip > Add to archive and select the format.
What is .tar.gz?
A .tar.gz file is a TAR archive compressed with gzip. It's a two-layer format: gzip compresses the TAR bundle. 7-Zip handles both layers automatically during extraction.
Can Windows open TAR files?
Windows 10/11 can open some TAR files natively, but 7-Zip provides better support including .tar.gz, .tar.xz, and POSIX metadata handling.
Is TAR compressed?
TAR itself does not compress — it only bundles files. Compression is provided by external tools: gzip (.tar.gz), bzip2 (.tar.bz2), or xz (.tar.xz).
准备使用7-Zip了吗?
立即下载免费、官方的7-Zip。