DELAPARRA
Index
Color
NL
Category: CLI commands

tar

Explained by Updated

What is tar?

tar: Tape Archive — Create or extract .tar (and .tar.gz) archives. tar bundles files and folders into a single archive file, and unpacks them again. tar -czf backup.tar.gz storage/ creates a compressed archive, and tar -xzf backup.tar.gz extracts it. -t lists the contents without extracting. The letters mean: c create, x extract, z gzip compression, f the file name follows. -C extracts into another folder, which avoids unpacking into the wrong place.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about tar

What should you keep in mind with tar?

Tar keeps file permissions and ownership, which makes it suitable for backups and moving folders between servers. Check what an archive contains with tar -tf before extracting one you did not make, because archives can contain absolute paths or overwrite existing files. For very large backups, zstd compression with --zstd is much faster than gzip at a similar size.

At a glance

CategoryCLI commands
Explained by
Updated

More CLI commands terms

All terms starting with T

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.