How to compress and extract archives

Create and unpack tar.gz, tar.xz and zip archives on Linux and Windows, with exclusions, extraction targets and a safe preview step.

Beginner · about 5 min · Linux, Windows, macOS

Archiving turns a directory into one transferable file and usually shrinks it. tar rules on Linux, zip travels best between platforms, and PowerShell has native cmdlets on Windows.

What this guide covers

Common pitfalls covered

Questions answered

This is a limited preview. The full walkthrough, command syntax and copy-ready examples are available to signed-in users.

Sign in to read the full page