tar
is a file archive format that allows multiple files to be stored in a single file, called an “archive”. It’s commonly used for distributing and storing collections of files on Unix-like operating systems.
Here’s a brief overview of the tar
file format:
History: The tar
command was first introduced in 1979 as part of the Seventh Edition Unix. The name “tar” comes from “tape archive”, as it was originally designed to create archives for backup purposes on magnetic tapes.
Format Structure: A tar
archive consists of a series of blocks, each containing a file’s metadata (e.g., filename, permissions, ownership) followed by the file’s contents. Each block is 512 bytes long, and the archive is typically written in a sequential manner.
Here’s a high-level breakdown of the tar
format:
- File Header (512 bytes): Contains metadata about the file, including:
- Filename (up to 100 characters)
- File mode (permissions)
- User ID
- Group ID
- File size
- Timestamps (last modification and last access times)
- File Contents: The actual contents of the file, padded with zeros to a multiple of 512 bytes.
- Block Padding (optional): If the file size is not a multiple of 512 bytes, padding is added to fill the block.
Types of tar
Archives: There are several variations of the tar
format:
- V7 Tar (original): This is the oldest and most basic format.
- Ustar Tar (POSIX.1-1988): An extension of V7 tar, with additional features like file sizes greater than 2 GB.
- GNU Tar (GNU extensions): Adds features like sparse files, incremental backups, and multi-volume support.
tar
archives can be compressed using various algorithms, such as gzip (tar.gz
) or bzip2 (tar.bz2
), to reduce storage size.
Overall, the tar
format has become a de facto standard for archiving files on Unix-like systems, and its versatility and simplicity have made it a popular choice for distributing software packages, backing up data, and more.
- 7z Compressed Archives
- AAC Audio Format
- AFDESIGN Affinity Designer File Format
- AFPHOTO Affinity Photo File Format
- AFPUB Affinity Publisher File Format
- AI Adobe Illustrator File Format
- ARJ Compressed Archives
- CAB Compressed Archive
- CDR CorelDRAW File Format
- CSS Files
- DOC Microsoft Word Document (Legacy)
- DOCX Microsoft Word Document
- EPS Document Format
- FLAC Audio Format
- FLV Flash Video Format
- GIF Image Format
- HTML Files
- ICO Image Format
- ISO Files
- JPEG Image Format
- JS Files
- JSON Files
- M4A Audio Format
- M4V Video Format
- MKV Media Format
- MOV Video Format
- MP3 Audio Format
- MP4 Video Format
- MPEG Media Formats
- MPG Video Format
- PDF Document Format
- PNG Image Format
- PPT Microsoft PowerPoint Presentation (Legacy)
- PPTX Microsoft PowerPoint Presentation
- PS Document Format
- PSD Adobe Photoshop File Format
- PST Microsoft Outlook Data File
- RAR Compressed Archives
- RTF Rich Text Format
- SVG Graphics Format
- TAR Archives
- TGA Image Format
- TIFF Image Format
- TXT Files
- URL Files
- WebP Image Format
- WMA Audio Format
- WMF Graphics Format
- WMV Video Format
- XLS Microsoft Excel Spreadsheet (Legacy)
- XLSX Microsoft Excel Spreadsheet
- XML File Format
- ZIP Compressed Archives