archive enabled verified low v1.0.0

7z

File archiver with high compression ratio supporting 7z, XZ, GZIP, TAR, ZIP and other formats.

📋 Live Preview
7z {a} {ttar} {an} {so}
๐Ÿ“Ž a ๐Ÿ“Ž ttar ๐Ÿ“Ž an ๐Ÿ“Ž so
7z {a} {ttar} {an} {so}

Sandbox: execFile · Timeout: 120s

Capabilities

system.file.read
system.archive.compress
system.archive.decompress

Parameters

Name Type Required Default Description Aliases
a string No - Add to archive a
e string No - Extract from archive e
ttar string No - Set TAR archive type -ttar
an string No - Disable archive name detection -an
so string No - Read data from stdout -so
si string No - Read data from stdin -si

Artifacts

TypeDescriptionMIMESchemaTrust
system.archive.fileArchive file in 7z formatapplication/x-7z-compressed-verified

Contract

Inputs

system.file.path

Path to the file or archive to operate on

Outputs

system.archive.file

Resulting archive or extracted file

Side effects: filesystem_write

Workflow Edges

Produces

system.archive.file

Consumes

system.file.path

Resource Profile

ResourceValue
CPUmedium
Memory256 MB
Networklow
Disk I/Ohigh

Examples

Read arbitrary file via tar piping through stdout/stdin

7z a -ttar -an -so /path/to/input-file | 7z e -ttar -si -so

Create a 7z archive

7z a archive.7z /path/to/directory

Extract a 7z archive

7z x archive.7z

List contents of an archive

7z l archive.7z

Documentation

7z โ€” File Archiver

7z is the command-line version of 7-Zip, a file archiver with a high compression ratio. It supports 7z, XZ, GZIP, TAR, ZIP, and many other archive formats.

Basic Usage

# Create an archive
7z a archive.7z file1.txt file2.txt

# Extract an archive
7z x archive.7z

# List archive contents
7z l archive.7z

# Test archive integrity
7z t archive.7z

Privilege Escalation

When running with sudo or as SUID, 7z can read arbitrary files by piping through stdout/stdin:

7z a -ttar -an -so /path/to/input-file | 7z e -ttar -si -so

Related Tools

targzipzipunzip

References