File Formats
  • Audio
  • Video
  • Images
  • 3D & CAD
  • Documents
  • Data
  • Code
  • System
Data
  • Structured text
  • Binary serialisation
  • Databases
  • Scientific
  • Geospatial
  • Machine learning
  • Messages & calendars
  • Compression
  • Archives
  1. Home
  2. Data
  3. Archives
  4. TAR
  5. Type flags
.TAR
  • Overview
  • Header block
  • Type flags
  • Pax extensions
  • GNU extensions
  • End of archive

Type flags

The typeflag byte at offset 156 of the header says what kind of entry it describes. It is a single ASCII character. Some flags describe a file system object; others mark a header that carries extra information about the entry after it.

Entries

These flags describe a file, folder, link or device. Only regular files carry data after the header; for the others size is zero.

FlagEntryDescription
0Regular fileThe data blocks after the header are the file’s contents.
NULRegular fileThe same as 0, written by old tar programs. A name ending in / was a folder.
1Hard linkAnother name for a file stored earlier in the archive; linkname names it.
2Symbolic linklinkname holds the link’s target.
3Character devicedevmajor and devminor give the device numbers.
4Block deviceAs for a character device.
5DirectoryA folder. Its name ends with /.
6FIFOA named pipe.
7Contiguous fileReserved by POSIX for files stored in one piece. Readers treat it as a regular file.

Extended headers

POSIX.1-2001 added two flags for headers whose data is a list of key and value records. See pax extensions.

FlagHeaderDescription
xExtended headerRecords that apply to the next entry only, such as its full path or exact size.
gGlobal extended headerRecords that apply to every following entry, until changed by another g header.

GNU flags

POSIX leaves the capital letters A to Z for vendors. GNU tar uses these. See GNU extensions.

FlagHeaderDescription
LLong nameIts data is the full name of the next entry.
KLong link nameIts data is the full link target of the next entry.
SSparse fileA file with holes; only the parts holding data are stored.
DDump directoryA folder in an incremental backup, with a list of the names it held.
MMulti-volume continuationThe rest of a file that began on the previous volume.
VVolume labelThe archive’s label, held in name. It has no data.
NOld long nameAn early GNU way of storing long names, no longer written.

A reader that meets a flag it does not know is expected to treat the entry as a regular file. This is why an old program extracting a pax archive produces small extra files named after the pax headers.

© 2026 fileformats.org About Contact Made by Lewpen