TAR Archive
ArchivesTAR bundles files/directories. Archiving is distinct from compression: .tar.gz is a TAR archive compressed with gzip.
- What it is used for
- Bundling a file hierarchy
- What the file contains
- Binary data
All sections, questions and sources
Content reviewed: · Editor:Kai
Opening steps
Choose your environment or purpose to see its steps.
Menu labels and support vary by app, OS and version. Preserve the original before making changes.
Troubleshooting by symptom
- A gzip error can mean a compressed option was applied to plain TAR, or the suffix misidentifies the data.
- Permission/symlink handling varies by OS/tool. Inspect in a dedicated directory rather than forcing administrative extraction.
- Possible overwrite: extract to a new work folder instead of an existing directory.
- Permissions differ across systems: inspect stored metadata and extraction behavior.
- TAR does not reduce size: it bundles files; compression is a separate stage.
TAR → tar.gz
- Keep the TAR and compress a copy; for example,
gzip -c archive.tar > archive.tar.gzcreates a separate output. - Check the compressed archive listing with
tar -tzf archive.tar.gz. - Inspect resulting folders, file counts and sizes. When repacking, verify the new listing and a test extraction.
Compression depends on content. Verify the recipient’s handling of TAR attributes and links.
Choose the destination before extraction
An archive can place many files directly in the destination; inspect its listing first.
An empty work directory makes mixing and overwrite risks easier to control.
Source for these steps:GNU Project · GNU tar: How to List Archives / GNU Project · GNU tar: How to Extract Members from an Archive
Permissions, links and backups
TAR can include links and permissions whose restoration varies by OS and tool.
After repacking, check required paths, names and permissions and retain the original TAR.
Source for these steps:GNU Project · GNU tar: How to List Archives / GNU Project · GNU tar: How to Extract Members from an Archive
Related-format differences
| Format | Main role | Selection notes |
|---|---|---|
| TAR | Bundle multiple files | Not itself compression |
| TAR.GZ / TAR.XZ | Compress a TAR | Two-layer structure |
| ZIP | Bundling and compression | Check metadata handling |
Handling and security
Inspect archive paths and avoid extracting directly over important directories. Assess execution separately.
Questions and answers
Is TAR compressed?
Ordinary TAR is an archive, commonly compressed separately with gzip or another compressor.
Is .tar.gz two files?
It is one gzip-compressed TAR; the suffix reflects the two stages.
Can Windows extract TAR?
Compatible OS versions/tools can extract it; metadata fidelity still needs checking.
How does TAR differ from TAR.GZ?
TAR bundles files; TAR.GZ applies Gzip compression to the bundle.
Does a readable listing prove no damage?
No. Verify extraction of required data and any publisher integrity information.
Format facts: name, steward and MIME type
- Formal name
- Tape archive
- Steward / specification
- POSIX archive conventions / GNU and other implementations
- MIME type
- application/x-tar (commonly used)
Primary and official sources
- Project documentationGNU tar manual
Documents TAR listing/extraction and gzip integration.
GNU · Link checked: - Project documentationGNU Gzip manual
Documents gzip testing/extraction and its role alongside TAR.
GNU · Link checked: - Project documentationGNU tar: How to List Archives
Inspecting archive names and structure before extraction.
GNU Project · Link checked: - Project documentationGNU tar: How to Extract Members from an Archive
TAR extraction and effects on existing files.
GNU Project · Link checked: