Skip to content

TAR · 5 files

TAR sample files - free download

Download verified sample TAR and Gzip-compressed TAR (.tar.gz) archives containing realistic image packs, business documents, developer source bundles, multimedia assets, and nested directory trees. Perfect for testing file upload limits, POSIX ustar parsing, safe extraction pipelines, and container builds.

5 files TAR / TAR.GZ 20 Entries POSIX ustar & Gzip bundles

TAR archive library

Available TAR & TAR.GZ samples

5 files

1.1 MB

Image collection bundle (POSIX ustar)

sample-tar-images-bundle.tar

JPEG, PNG, WebP and SVG

4

Download TAR

533.2 KB

Document workflow bundle (tar.gz)

sample-tar-documents-bundle.tar.gz

DOCX, PDF, XLSX and TXT

4

Download TAR

4.5 KB

Developer source & config bundle (tar.gz)

sample-tar-developer-code.tar.gz

JSON, YAML, SQL and Markdown

4

Download TAR

1.7 MB

Multimedia asset archive (POSIX ustar)

sample-tar-media-assets.tar

MP4, MP3 and WAV

3

Download TAR

80.8 KB

Nested directory structure bundle (tar.gz)

sample-tar-nested-tree.tar.gz

Multi-level directories with SVG, JPG, JSON, PDF and TXT

5

Download TAR

TAR testing guide

Test TAR and TAR.GZ archive extraction pipelines with predictable Unix-standard fixtures

TAR (Tape Archive) is a Unix file container format introduced in 1979 in Unix Version 7 by AT&T Bell Labs. Standardized under POSIX.1 (ustar and pax), TAR concatenates files, directories, permissions, and metadata into a contiguous stream of 512-byte blocks. While uncompressed by default, it is routinely paired with Gzip (.tar.gz / .tgz) for distribution. These test fixtures allow developers and QA engineers to safely validate extraction pipelines, path sanitization, and container ingestion.

What is inside each TAR sample and how is it structured?

Each archive packages safe, verified TestingFile assets organized into logical directory trees. We provide 5 distinct fixtures: an uncompressed POSIX ustar image bundle (.tar), a Gzip-compressed business document bundle (.tar.gz), a developer code archive with configs and database schemas (.tar.gz), an uncompressed multimedia asset archive (.tar), and a multi-level nested folder structure designed to test directory recursion and path resolution.

Unlike ZIP files which compress each file independently, TAR archives package files sequentially, preserving Unix permissions (octal mode), timestamps, and directory structures. This makes TAR essential for Docker/OCI container layers, Linux package distribution, and system backups.

Before extracting a TAR archive in production

  • ✓ Sanitize all file paths: reject or strip leading slashes ("/") and directory traversal sequences ("../") to prevent writing outside the target extraction root.
  • ✓ Block symlink and hardlink traversal: verify that symbolic links do not resolve to system files or paths outside the extraction directory.
  • ✓ Prevent "tar bombs": ensure extracted archives unpack into a designated destination subfolder rather than scattering files across the current working directory.
  • ✓ Enforce maximum extracted size and file-count thresholds to defend against decompression bombs.
  • ✓ Ignore or safely map Unix ownership (UID/GID) and setuid/setgid permission bits when extracting archives submitted by untrusted users.

Frequently asked questions

What is a TAR file?

A TAR file (Tape Archive) is a standard archive container created according to POSIX specifications. It bundles multiple files, folders, and Unix metadata (permissions, timestamps, ownership) into a single sequential byte stream divided into 512-byte blocks.

What is the difference between TAR and TAR.GZ?

A plain TAR file (.tar) is an uncompressed container; its file size is equal to the sum of all contained files plus 512-byte header blocks. A TAR.GZ file (.tar.gz or .tgz) is a TAR archive that has been compressed using the gzip (DEFLATE) algorithm, resulting in a dramatically smaller file.

What is the difference between TAR, ZIP, RAR, and 7Z?

ZIP compresses each file independently, making random access fast but cross-file compression lower. RAR and 7Z are proprietary or modern formats with solid compression and built-in AES encryption. TAR is a pure Unix packaging standard that preserves POSIX permissions and directory trees, leaving compression to external tools like gzip, bzip2, or xz.

How do I open or extract a TAR file?

On Windows 10 and 11, the built-in "tar -xf <filename>" command works natively in PowerShell and Command Prompt, or you can use 7-Zip. On macOS and Linux, the native "tar -xf <filename>" command extracts both .tar and .tar.gz files directly.

What is the ustar format in TAR?

ustar (Uniform Standard Tape Archive) is the POSIX.1-1988 standard format for TAR. It defines a standardized 512-byte header containing the file name, mode, UID, GID, size, modification time, checksum, typeflag, linkname, and the "ustar\0" magic signature string.

Can TAR files contain malicious paths?

Yes. Untrusted TAR files can include absolute paths (e.g. "/etc/shadow") or relative traversal paths (e.g. "../../../root/.bashrc"). Modern extraction tools and web server pipelines must sanitize all entry paths before writing files to disk.

TAR format technical specifications

Standard extensions

.tar .tar.gz .tgz

Standard MIME types

application/x-tar · application/gzip

Archive structure

POSIX ustar / pax sequential stream of 512-byte header and data blocks

Related category

Archives

Specification reference: Tar Format on Wikipedia & POSIX.1 ustar Standards