
- An archive is a single file that contains a collection of files and directories (useful for transfer or backup).
- The tar format is a container that preserves file metadata and directory structure; tar archives typically end in
.tar. - Tar archives are not compressed by default; you can compress them using tar options (
-z,-j,-J) or separate compression utilities (gzip, bzip2, xz).

Tip:
-f requires the archive filename as the very next argument (e.g., tar -cvf archive.tar files/). Use -C <directory> to extract into a different location.
Examples of creating and extracting archives
Create an uncompressed archive:
-C:
.tar file with dedicated tools:
Warning: When extracting archives, be cautious—archives may contain absolute paths or files that overwrite existing data. Audit contents with
tar -tvf archive.tar before extraction, and use -C to extract into a safe directory when unsure.
Further reading and references
- tar manual:
man tar - GNU tar documentation
- Kubernetes and backup strategies (related patterns for archiv-ing and transfer)