Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Tar (computing)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===UStar format=== Most modern tar programs read and write archives in the UStar (''Unix Standard TAR''<ref name="tar5"/><ref>{{cite book |last=Kientzle |first=Tim |date=1995 |title=Internet File Formats |publisher=Coriolis Groups Books |isbn=978-1-883577-56-8 |url=https://archive.org/details/mac_Internet_File_Formats_1995 |page=[https://archive.org/details/mac_Internet_File_Formats_1995/page/n202 196] |access-date=2022-11-10}}</ref>) format, introduced by the POSIX IEEE P1003.1 standard from 1988. It introduced additional header fields. Older tar programs will ignore the extra information (possibly extracting partially named files), while newer programs will test for the presence of the "ustar" string to determine if the new format is in use. The UStar format allows for longer file names and stores additional information about each file. The maximum filename size is 255, but it is split among a preceding path "filename prefix" and the filename itself, so can be much less.<ref name="gnu.org">{{Cite web | url=https://www.gnu.org/software/tar/manual/html_chapter/Formats.html#Compression|title = GNU tar 1.32: 8.1 Using Less Space through Compression | date = 2019-02-23 | website = GNU | access-date = 2019-08-11}}</ref> {| class="wikitable" |- ! Field offset ! Field size ! Field |- | 0 | 156 | ''(Several fields, same as in the old format)'' |- | 156 | 1 | Type flag |- | 157 | 100 | ''(Same field as in the old format)'' |- | 257 | 6 | UStar indicator, "ustar", then NUL |- | 263 | 2 | UStar version, "00" |- | 265 | 32 | Owner user name |- | 297 | 32 | Owner group name |- | 329 | 8 | Device major number |- | 337 | 8 | Device minor number |- | 345 | 155 | Filename prefix |} The ''type flag'' field can have the following values: {| class="wikitable" |+ Type flag field |- ! Value ! Meaning |- | '0' or ([[ASCII]] [[Null character|NUL]]) | Normal file |- | '1' | [[Hard link]] |- | '2' | [[Symbolic link]] |- | '3' | [[Device file|Character special]] |- | '4' | [[Device file|Block special]] |- | '5' | [[Directory (computing)|Directory]] |- | '6' | [[Named pipe|FIFO]] |- | '7' | Contiguous file |- | 'g' | Global extended header with meta data (POSIX.1-2001) |- | 'x' | Extended header with metadata for the next file in the archive (POSIX.1-2001) |- | 'A'β'Z' | Vendor specific extensions (POSIX.1-1988) |- | All other values | Reserved for future standardization |} POSIX.1-1988 vendor specific extensions using link flag values 'A'β'Z' partially have a different meaning with different vendors and thus are seen as outdated and replaced by the POSIX.1-2001 extensions that also include a vendor tag. Type '7' (Contiguous file) is formally marked as reserved in the POSIX standard, but was meant to indicate files which ought to be contiguously allocated on disk. Few operating systems support creating such files explicitly, and hence most TAR programs do not support them, and will treat type 7 files as if they were type 0 (regular). An exception is older versions of GNU tar, when running on the [[MASSCOMP]] RTU (Real Time Unix) operating system, which supported an O_CTG flag to the open() function to request a contiguous file; however, that support was removed from GNU tar version 1.24 onwards.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)