tar

The command that bundles a directory tree into a single archive file, lists one, or unpacks one.

In more detail

-c creates, -t lists and -x extracts; -f names the archive file and -z compresses or decompresses with gzip on the way. -C dir unpacks into another directory. List an archive before extracting it, because entries may overwrite files where you unpack.

Examples

tar -czf notes.tar.gz notes
tar -xzf notes.tar.gz -C restored
tar -cf dist/app.tar -C dist main.py
dist/calc-2.4.0.tar

Related terms

Taught in

References

Certification courses