$ tar
An archiving utility
DOCUMENTEDArchivesUbuntu 24.04 LTS baseline
Synopsis
tar [OPTION...] [FILE]...
What it does
- `tar` creates and extracts archives and can combine archiving with compression programs such as gzip.
- The option letters shown here are common GNU tar forms; consult the manual for ordering and long-option details.
Examples
Create a gzip-compressed archive
tar -czf backup.tar.gz directory/Extract a gzip-compressed archive
tar -xzf backup.tar.gzList archive contents
tar -tzf backup.tar.gzImportant details
These examples are intentionally conservative. Command behavior can still depend on filesystem state, permissions, locale, shell, installed package version, and other system configuration.
For exact option semantics, the linked authoritative documentation is the source of truth.