diff options
Diffstat (limited to 'archivers/libarchive/files/doc/html/tar.5.html')
-rw-r--r-- | archivers/libarchive/files/doc/html/tar.5.html | 3057 |
1 files changed, 1400 insertions, 1657 deletions
diff --git a/archivers/libarchive/files/doc/html/tar.5.html b/archivers/libarchive/files/doc/html/tar.5.html index 3e243eb9e1c..ee16a228c39 100644 --- a/archivers/libarchive/files/doc/html/tar.5.html +++ b/archivers/libarchive/files/doc/html/tar.5.html @@ -1,1657 +1,1400 @@ -%!PS-Adobe-3.0 -%%Creator: groff version 1.19.2 -%%CreationDate: Sun Mar 14 02:49:17 2010 -%%DocumentNeededResources: font Times-Roman -%%DocumentSuppliedResources: procset grops 1.19 2 -%%Pages: 146 -%%PageOrder: Ascend -%%DocumentMedia: Default 612 792 0 () () -%%Orientation: Portrait -%%EndComments -%%BeginDefaults -%%PageMedia: Default -%%EndDefaults -%%BeginProlog -%%BeginResource: procset grops 1.19 2 -%!PS-Adobe-3.0 Resource-ProcSet -/setpacking where{ -pop -currentpacking -true setpacking -}if -/grops 120 dict dup begin -/SC 32 def -/A/show load def -/B{0 SC 3 -1 roll widthshow}bind def -/C{0 exch ashow}bind def -/D{0 exch 0 SC 5 2 roll awidthshow}bind def -/E{0 rmoveto show}bind def -/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def -/G{0 rmoveto 0 exch ashow}bind def -/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/I{0 exch rmoveto show}bind def -/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def -/K{0 exch rmoveto 0 exch ashow}bind def -/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/M{rmoveto show}bind def -/N{rmoveto 0 SC 3 -1 roll widthshow}bind def -/O{rmoveto 0 exch ashow}bind def -/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/Q{moveto show}bind def -/R{moveto 0 SC 3 -1 roll widthshow}bind def -/S{moveto 0 exch ashow}bind def -/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def -/SF{ -findfont exch -[exch dup 0 exch 0 exch neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/MF{ -findfont -[5 2 roll -0 3 1 roll -neg 0 0]makefont -dup setfont -[exch/setfont cvx]cvx bind def -}bind def -/level0 0 def -/RES 0 def -/PL 0 def -/LS 0 def -/MANUAL{ -statusdict begin/manualfeed true store end -}bind def -/PLG{ -gsave newpath clippath pathbbox grestore -exch pop add exch pop -}bind def -/BP{ -/level0 save def -1 setlinecap -1 setlinejoin -72 RES div dup scale -LS{ -90 rotate -}{ -0 PL translate -}ifelse -1 -1 scale -}bind def -/EP{ -level0 restore -showpage -}def -/DA{ -newpath arcn stroke -}bind def -/SN{ -transform -.25 sub exch .25 sub exch -round .25 add exch round .25 add exch -itransform -}bind def -/DL{ -SN -moveto -SN -lineto stroke -}bind def -/DC{ -newpath 0 360 arc closepath -}bind def -/TM matrix def -/DE{ -TM currentmatrix pop -translate scale newpath 0 0 .5 0 360 arc closepath -TM setmatrix -}bind def -/RC/rcurveto load def -/RL/rlineto load def -/ST/stroke load def -/MT/moveto load def -/CL/closepath load def -/Fr{ -setrgbcolor fill -}bind def -/setcmykcolor where{ -pop -/Fk{ -setcmykcolor fill -}bind def -}if -/Fg{ -setgray fill -}bind def -/FL/fill load def -/LW/setlinewidth load def -/Cr/setrgbcolor load def -/setcmykcolor where{ -pop -/Ck/setcmykcolor load def -}if -/Cg/setgray load def -/RE{ -findfont -dup maxlength 1 index/FontName known not{1 add}if dict begin -{ -1 index/FID ne{def}{pop pop}ifelse -}forall -/Encoding exch def -dup/FontName exch def -currentdict end definefont pop -}bind def -/DEFS 0 def -/EBEGIN{ -moveto -DEFS begin -}bind def -/EEND/end load def -/CNT 0 def -/level1 0 def -/PBEGIN{ -/level1 save def -translate -div 3 1 roll div exch scale -neg exch neg exch translate -0 setgray -0 setlinecap -1 setlinewidth -0 setlinejoin -10 setmiterlimit -[]0 setdash -/setstrokeadjust where{ -pop -false setstrokeadjust -}if -/setoverprint where{ -pop -false setoverprint -}if -newpath -/CNT countdictstack def -userdict begin -/showpage{}def -/setpagedevice{}def -}bind def -/PEND{ -countdictstack CNT sub{end}repeat -level1 restore -}bind def -end def -/setpacking where{ -pop -setpacking -}if -%%EndResource -%%EndProlog -%%BeginSetup -%%BeginFeature: *PageSize Default -<< /PageSize [ 612 792 ] /ImagingBBox null >> setpagedevice -%%EndFeature -%%IncludeResource: font Times-Roman -grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 -def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron -/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef -/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent -/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen -/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon -/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O -/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex -/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y -/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft -/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl -/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut -/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash -/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen -/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft -/logicalnot/minus/registered/macron/degree/plusminus/twosuperior -/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior -/ordmasculine/guilsinglright/onequarter/onehalf/threequarters -/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE -/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex -/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis -/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn -/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla -/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis -/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash -/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def -/Times-Roman@0 ENC0/Times-Roman RE -%%EndSetup -%%Page: 1 1 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<html>)0 12 Q(<head>)0 24 Q(<title>)36 36 Q -(December 27, 2009 tar 5)74.5 48 Q(</title>)36 72 Q 0 Cg EP -%%Page: 2 2 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<style type="te)36 12 Q(xt/css">)-.15 E(<!--)36 -24 Q(body { mar)72 36 Q(gin-left:4%; })-.18 E(H1, H2, H3, H4, H5 {)72 48 -Q(color: maroon; padding: 4pt; mar)108 60 Q(gin-left: -4%;)-.18 E -(border: solid; border)108 72 Q(-width: thin; width: 100%;)-.2 E 0 Cg EP -%%Page: 3 3 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(background: r)108 12 Q(gb\(204,204,255\))-.18 E -(})72 24 Q(-->)36 36 Q(</style>)36 48 Q(</head>)0 60 Q -(<body bgcolor="#FFFFFF" te)0 72 Q(xt="#000000">)-.15 E 0 Cg EP -%%Page: 4 4 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<h3 id="N)36 12 Q(AME">)-.35 E -.35(NA)36 24 S -(ME).35 E(</h3>)36 36 Q(<b>tar</b>)0 48 Q 2.5(-f)0 60 S -(ormat of tape archi)-2.5 E .3 -.15(ve \214)-.25 H(les).15 E -(<h3 id="DESCRIPTION">)36 72 Q 0 Cg EP -%%Page: 5 5 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(DESCRIPTION)36 12 Q(</h3>)36 24 Q(The)0 36 Q -(<b>tar</b>)0 48 Q(archi)0 60 Q .3 -.15(ve f)-.25 H(ormat collects an) -.15 E 2.5(yn)-.15 G(umber of \214les, directories, and other)-2.5 E -(\214le system objects \(symbolic links, de)0 72 Q -(vice nodes, etc.\) into a single)-.25 E 0 Cg EP -%%Page: 6 6 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(stream of bytes.)0 12 Q(The format w)0 24 Q -(as originally designed to be used with)-.1 E(tape dri)0 36 Q -.15(ve) --.25 G 2.5(st).15 G(hat operate with \214x)-2.5 E(ed-size blocks, b)-.15 -E(ut is widely used as)-.2 E 2.5(ag)0 48 S(eneral packaging mechanism.) --2.5 E(<h4 id="General F)36 60 Q(ormat">)-.15 E(General F)36 72 Q(ormat) --.15 E 0 Cg EP -%%Page: 7 7 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h4>)36 12 Q(A)0 24 Q(<b>tar</b>)0 36 Q(archi)0 -48 Q .3 -.15(ve c)-.25 H(onsists of a series of 512-byte records.).15 E -(Each \214le system object requires a header record which stores basic \ -metadata)0 60 Q(\(pathname, o)0 72 Q(wner)-.25 E 2.5(,p)-.4 G -(ermissions, etc.\) and zero or more records containing an)-2.5 E(y)-.15 -E 0 Cg EP -%%Page: 8 8 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\214le data.)0 12 Q(The end of the archi)0 24 Q -.3 -.15(ve i)-.25 H 2.5(si).15 G(ndicated by tw)-2.5 E 2.5(or)-.1 G -(ecords consisting)-2.5 E(entirely of zero bytes.)0 36 Q(<p>)36 48 Q --.15(Fo)0 60 S 2.5(rc).15 G(ompatibility with tape dri)-2.5 E -.15(ve) --.25 G 2.5(st).15 G(hat use \214x)-2.5 E(ed block sizes,)-.15 E -(programs that read or write tar \214les al)0 72 Q -.1(wa)-.1 G -(ys read or write a \214x).1 E(ed)-.15 E 0 Cg EP -%%Page: 9 9 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(number of records with each I/O operation.)0 12 -Q(These)0 24 Q -.74(``)0 36 S(blocks').74 E(')-.74 E(are al)0 48 Q -.1 -(wa)-.1 G(ys a multiple of the record size.).1 E -(The maximum block size supported by early)0 60 Q(implementations w)0 72 -Q(as 10240 bytes or 20 records.)-.1 E 0 Cg EP -%%Page: 10 10 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(This is still the def)0 12 Q -(ault for most implementations)-.1 E -(although block sizes of 1MiB \(2048 records\) or lar)0 24 Q(ger are) --.18 E(commonly used with modern high-speed tape dri)0 36 Q -.15(ve)-.25 -G(s.).15 E(\(Note: the terms)0 48 Q -.74(``)0 60 S(block').74 E(')-.74 E -(and)0 72 Q 0 Cg EP -%%Page: 11 11 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(record').74 E(')-.74 E -(here are not entirely standard; this document follo)0 24 Q(ws the)-.25 -E(con)0 36 Q -.15(ve)-.4 G -(ntion established by John Gilmore in documenting).15 E(<b>pdtar</b>.\)) -0 48 Q(<h4 id="Old-Style Archi)36 60 Q .3 -.15(ve Fo)-.25 H(rmat">).15 E -(Old-Style Archi)36 72 Q .3 -.15(ve Fo)-.25 H(rmat).15 E 0 Cg EP -%%Page: 12 12 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h4>)36 12 Q(The original tar archi)0 24 Q .3 --.15(ve f)-.25 H(ormat has been e).15 E(xtended man)-.15 E 2.5(yt)-.15 G -(imes to)-2.5 E(include additional information that v)0 36 Q -(arious implementors found)-.25 E(necessary)0 48 Q(.)-.65 E -(This section describes the v)0 60 Q -(ariant implemented by the tar command)-.25 E(included in)0 72 Q 0 Cg EP -%%Page: 13 13 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -1.11(Ve)0 12 S(rsion 7 <code>A)1.11 E -(T&T UNIX</code>,)-1.11 E(which seems to be the earliest widely-used v)0 -24 Q(ersion of the tar program.)-.15 E(<p>)36 36 Q -(The header record for an old-style)0 48 Q(<b>tar</b>)0 60 Q(archi)0 72 -Q .3 -.15(ve c)-.25 H(onsists of the follo).15 E(wing:)-.25 E 0 Cg EP -%%Page: 14 14 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dl compact><dt><dd>)0 12 Q(<code>)0 24 Q(<pre>) -0 36 Q(struct header_old_tar {)0 48 Q(char name[100];)36 60 Q -(char mode[8];)36 72 Q 0 Cg EP -%%Page: 15 15 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(char uid[8];)36 12 Q(char gid[8];)36 24 Q -(char size[12];)36 36 Q(char mtime[12];)36 48 Q(char checksum[8];)36 60 -Q(char link\215ag[1];)36 72 Q 0 Cg EP -%%Page: 16 16 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(char linkname[100];)36 12 Q(char pad[255];)36 24 -Q(};)0 36 Q(</pre>)0 48 Q(</code>)0 60 Q(</dl>)0 72 Q 0 Cg EP -%%Page: 17 17 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(All unused bytes in the header record are \214lled with nulls.)0 12 Q -(<dl compact>)0 24 Q(<p><dt><i></i><i>name</i><dd>)0 36 Q -.15(Pa)0 48 S -(thname, stored as a null-terminated string.).15 E -(Early tar implementations only stored re)0 60 Q -(gular \214les \(including)-.15 E(hardlinks to those \214les\).)0 72 Q 0 -Cg EP -%%Page: 18 18 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(One common early con)0 12 Q -.15(ve)-.4 G -(ntion used a trailing "/" character to indicate).15 E 2.5(ad)0 24 S -(irectory name, allo)-2.5 E(wing directory permissions and o)-.25 E -(wner information)-.25 E(to be archi)0 36 Q -.15(ve)-.25 G 2.5(da).15 G -(nd restored.)-2.5 E(<p><dt><i></i><i>mode</i><dd>)0 48 Q -(File mode, stored as an octal number in ASCII.)0 60 Q -(<p><dt><i></i><i>uid</i><i></i>,<i> gid</i><dd>)0 72 Q 0 Cg EP -%%Page: 19 19 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(User id and group id of o)0 12 Q(wner)-.25 E 2.5 -(,a)-.4 G 2.5(so)-2.5 G(ctal numbers in ASCII.)-2.5 E -(<p><dt><i></i><i>size</i><dd>)0 24 Q -(Size of \214le, as octal number in ASCII.)0 36 Q -.15(Fo)0 48 S 2.5(rr) -.15 G -.15(eg)-2.5 G(ular \214les only).15 E 2.5(,t)-.65 G -(his indicates the amount of data)-2.5 E(that follo)0 60 Q -(ws the header)-.25 E(.)-.55 E(In particular)0 72 Q 2.5(,t)-.4 G -(his \214eld w)-2.5 E(as ignored by early tar implementations)-.1 E 0 Cg -EP -%%Page: 20 20 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(when e)0 12 Q(xtracting hardlinks.)-.15 E -(Modern writers should al)0 24 Q -.1(wa)-.1 G -(ys store a zero length for hardlink entries.).1 E -(<p><dt><i></i><i>mtime</i><dd>)0 36 Q -(Modi\214cation time of \214le, as an octal number in ASCII.)0 48 Q -(This indicates the number of seconds since the start of the epoch,)0 60 -Q(00:00:00 UTC January 1, 1970.)0 72 Q 0 Cg EP -%%Page: 21 21 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Note that ne)0 12 Q -.05(ga)-.15 G(ti).05 E .3 --.15(ve v)-.25 H(alues should be a)-.1 E -.2(vo)-.2 G(ided).2 E -(here, as the)0 24 Q 2.5(ya)-.15 G(re handled inconsistently)-2.5 E(.) --.65 E(<p><dt><i></i><i>checksum</i><dd>)0 36 Q -(Header checksum, stored as an octal number in ASCII.)0 48 Q 1.6 -.8 -(To c)0 60 T -(ompute the checksum, set the checksum \214eld to all spaces,).8 E -(then sum all bytes in the header using unsigned arithmetic.)0 72 Q 0 Cg -EP -%%Page: 22 22 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(This \214eld should be stored as six octal digits follo)0 12 Q -(wed by a null and a space)-.25 E(character)0 24 Q(.)-.55 E -(Note that man)0 36 Q 2.5(ye)-.15 G -(arly implementations of tar used signed arithmetic)-2.5 E -(for the checksum \214eld, which can cause interoperability problems)0 -48 Q(when transferring archi)0 60 Q -.15(ve)-.25 G 2.5(sb).15 G -(etween systems.)-2.5 E(Modern rob)0 72 Q -(ust readers compute the checksum both w)-.2 E(ays and accept the)-.1 E -0 Cg EP -%%Page: 23 23 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(header if either computation matches.)0 12 Q -(<p><dt><i></i><i>link\215ag</i><i></i>,<i> linkname</i><dd>)0 24 Q -(In order to preserv)0 36 Q 2.5(eh)-.15 G(ardlinks and conserv)-2.5 E -2.5(et)-.15 G(ape, a \214le)-2.5 E -(with multiple links is only written to the archi)0 48 Q .3 -.15(ve t) --.25 H(he \214rst).15 E(time it is encountered.)0 60 Q(The ne)0 72 Q -(xt time it is encountered, the)-.15 E 0 Cg EP -%%Page: 24 24 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<i></i><i>link\215ag</i>)0 12 Q -(is set to an ASCII)0 24 Q(`1')0 36 Q(and the)0 48 Q -(<i></i><i>linkname</i>)0 60 Q -(\214eld holds the \214rst name under which this \214le appears.)0 72 Q -0 Cg EP -%%Page: 25 25 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(Note that re)0 12 Q(gular \214les ha)-.15 E .3 --.15(ve a n)-.2 H(ull v).15 E(alue in the)-.25 E -(<i></i><i>link\215ag</i>)0 24 Q(\214eld.\))0 36 Q(</dl>)0 48 Q(<p>)36 -60 Q(Early tar implementations v)0 72 Q(aried in ho)-.25 E 2.5(wt)-.25 G -(he)-2.5 E 2.5(yt)-.15 G(erminated these \214elds.)-2.5 E 0 Cg EP -%%Page: 26 26 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The tar command in)0 12 Q -1.11(Ve)0 24 S -(rsion 7 <code>A)1.11 E(T&T UNIX</code>)-1.11 E(used the follo)0 36 Q -(wing con)-.25 E -.15(ve)-.4 G -(ntions \(this is also documented in early BSD manpages\):).15 E -(the pathname must be null-terminated;)0 48 Q -(the mode, uid, and gid \214elds must end in a space and a null byte;)0 -60 Q(the size and mtime \214elds must end in a space;)0 72 Q 0 Cg EP -%%Page: 27 27 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(the checksum is terminated by a null and a space.)0 12 Q(Early impleme\ -ntations \214lled the numeric \214elds with leading spaces.)0 24 Q -(This seems to ha)0 36 Q .3 -.15(ve b)-.2 H -(een common practice until the).15 E(IEEE Std 1003.1-1988 \(`)2.5 48 Q -(`<font size="-1">POSIX</font>.1')-.74 E('\))-.74 E(standard w)0 60 Q -(as released.)-.1 E -.15(Fo)0 72 S 2.5(rb).15 G(est portability)-2.5 E -2.5(,m)-.65 G(odern implementations should \214ll the numeric)-2.5 E 0 -Cg EP -%%Page: 28 28 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\214elds with leading zeros.)0 12 Q -(<h4 id="Pre-POSIX Archi)36 24 Q -.15(ve)-.25 G(s">).15 E -(Pre-POSIX Archi)36 36 Q -.15(ve)-.25 G(s).15 E(</h4>)36 48 Q -(An early draft of)0 60 Q(IEEE Std 1003.1-1988 \(`)2.5 72 Q -(`<font size="-1">POSIX</font>.1')-.74 E('\))-.74 E 0 Cg EP -%%Page: 29 29 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(serv)0 12 Q(ed as the basis for John Gilmore') --.15 E(s)-.55 E(<b>pdtar</b>)0 24 Q(program and man)0 36 Q 2.5(ys)-.15 G -(ystem implementations from the late 1980s)-2.5 E(and early 1990s.)0 48 -Q(These archi)0 60 Q -.15(ve)-.25 G 2.5(sg).15 G(enerally follo)-2.5 E -2.5(wt)-.25 G(he POSIX ustar)-2.5 E(format described belo)0 72 Q 2.5(ww) --.25 G(ith the follo)-2.5 E(wing v)-.25 E(ariations:)-.25 E 0 Cg EP -%%Page: 30 30 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<ul>)0 12 Q(<li>)0 24 Q(The magic v)0 36 Q -(alue is)-.25 E -.74(``)0 48 S(ustar ').74 E(')-.74 E(\(note the follo)0 -60 Q(wing space\).)-.25 E(The v)0 72 Q -(ersion \214eld contains a space character follo)-.15 E(wed by a null.) --.25 E 0 Cg EP -%%Page: 31 31 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<li>)0 12 Q -(The numeric \214elds are generally \214lled with leading spaces)0 24 Q -(\(not leading zeros as recommended in the \214nal standard\).)0 36 Q -(<li>)0 48 Q -(The pre\214x \214eld is often not used, limiting pathnames to)0 60 Q -(the 100 characters of old-style archi)0 72 Q -.15(ve)-.25 G(s.).15 E 0 -Cg EP -%%Page: 32 32 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</ul>)0 12 Q(<h4 id="POSIX ustar Archi)36 24 Q --.15(ve)-.25 G(s">).15 E(POSIX ustar Archi)36 36 Q -.15(ve)-.25 G(s).15 -E(</h4>)36 48 Q(IEEE Std 1003.1-1988 \(`)2.5 60 Q -(`<font size="-1">POSIX</font>.1')-.74 E('\))-.74 E -(de\214ned a standard tar \214le format to be read and written)0 72 Q 0 -Cg EP -%%Page: 33 33 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(by compliant implementations of)0 12 Q -(<a href="../html1/tar)0 24 Q(.html">tar\(1\)</a>.)-.55 E -(This format is often called the)0 36 Q -.74(``)0 48 S(ustar').74 E(') --.74 E(format, after the magic v)0 60 Q(alue used)-.25 E(in the header)0 -72 Q(.)-.55 E 0 Cg EP -%%Page: 34 34 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(The name is an acron)0 12 Q(ym for)-.15 E -.74 -(``)0 24 S(Unix Standard T).74 E(AR')-.93 E('.\))-.74 E(It e)0 36 Q -(xtends the historic format with ne)-.15 E 2.5<778c>-.25 G(elds:)-2.5 E -(<dl compact><dt><dd>)0 48 Q(<code>)0 60 Q(<pre>)0 72 Q 0 Cg EP -%%Page: 35 35 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(struct header_posix_ustar {)0 12 Q -(char name[100];)36 24 Q(char mode[8];)36 36 Q(char uid[8];)36 48 Q -(char gid[8];)36 60 Q(char size[12];)36 72 Q 0 Cg EP -%%Page: 36 36 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(char mtime[12];)36 12 Q(char checksum[8];)36 24 -Q(char type\215ag[1];)36 36 Q(char linkname[100];)36 48 Q -(char magic[6];)36 60 Q(char v)36 72 Q(ersion[2];)-.15 E 0 Cg EP -%%Page: 37 37 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(char uname[32];)36 12 Q(char gname[32];)36 24 Q -(char de)36 36 Q(vmajor[8];)-.25 E(char de)36 48 Q(vminor[8];)-.25 E -(char pre\214x[155];)36 60 Q(char pad[12];)36 72 Q 0 Cg EP -%%Page: 38 38 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(};)0 12 Q(</pre>)0 24 Q(</code>)0 36 Q(</dl>)0 -48 Q(<dl compact>)0 60 Q(<p><dt><i></i><i>type\215ag</i><dd>)0 72 Q 0 Cg -EP -%%Page: 39 39 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.8(Ty)0 12 S(pe of entry).8 E(.)-.65 E(POSIX e) -0 24 Q(xtended the earlier)-.15 E(<i></i><i>link\215ag</i>)0 36 Q -(\214eld with se)0 48 Q -.15(ve)-.25 G(ral ne).15 E 2.5(wt)-.25 G(ype v) --2.5 E(alues:)-.25 E(<dl compact>)0 60 Q(<dt>`)0 72 Q(`0')-.74 E('<dd>) --.74 E 0 Cg EP -%%Page: 40 40 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Re)0 12 Q(gular \214le.)-.15 E -(NUL should be treated as a synon)0 24 Q -(ym, for compatibility purposes.)-.15 E(<dt>`)0 36 Q(`1')-.74 E('<dd>) --.74 E(Hard link.)0 48 Q(<dt>`)0 60 Q(`2')-.74 E('<dd>)-.74 E -(Symbolic link.)0 72 Q 0 Cg EP -%%Page: 41 41 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt>`)0 12 Q(`3')-.74 E('<dd>)-.74 E -(Character de)0 24 Q(vice node.)-.25 E(<dt>`)0 36 Q(`4')-.74 E('<dd>) --.74 E(Block de)0 48 Q(vice node.)-.25 E(<dt>`)0 60 Q(`5')-.74 E('<dd>) --.74 E(Directory)0 72 Q(.)-.65 E 0 Cg EP -%%Page: 42 42 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dt>`)0 12 Q(`6')-.74 E('<dd>)-.74 E(FIFO node.) -0 24 Q(<dt>`)0 36 Q(`7')-.74 E('<dd>)-.74 E(Reserv)0 48 Q(ed.)-.15 E -(<dt>Other<dd>)0 60 Q 2.5(AP)0 72 S -(OSIX-compliant implementation must treat an)-2.5 E 2.5(yu)-.15 G -(nrecognized type\215ag v)-2.5 E(alue)-.25 E 0 Cg EP -%%Page: 43 43 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(as a re)0 12 Q(gular \214le.)-.15 E -(In particular)0 24 Q 2.5(,w)-.4 G -(riters should ensure that all entries)-2.5 E(ha)0 36 Q .3 -.15(ve a v) --.2 H(alid \214lename so that the)-.1 E 2.5(yc)-.15 G -(an be restored by readers that do not)-2.5 E -(support the corresponding e)0 48 Q(xtension.)-.15 E -(Uppercase letters "A" through "Z" are reserv)0 60 Q(ed for custom e) --.15 E(xtensions.)-.15 E(Note that sock)0 72 Q -(ets and whiteout entries are not archi)-.1 E -.25(va)-.25 G(ble.).25 E -0 Cg EP -%%Page: 44 44 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</dl>)0 12 Q(It is w)0 24 Q -(orth noting that the)-.1 E(<i></i><i>size</i>)0 36 Q -(\214eld, in particular)0 48 Q 2.5(,h)-.4 G(as dif)-2.5 E -(ferent meanings depending on the type.)-.25 E -.15(Fo)0 60 S 2.5(rr).15 -G -.15(eg)-2.5 G -(ular \214les, of course, it indicates the amount of data).15 E(follo)0 -72 Q(wing the header)-.25 E(.)-.55 E 0 Cg EP -%%Page: 45 45 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.15(Fo)0 12 S 2.5(rd).15 G -(irectories, it may be used to indicate the total size of all)-2.5 E -(\214les in the directory)0 24 Q 2.5(,f)-.65 G -(or use by operating systems that pre-allocate)-2.5 E(directory space.)0 -36 Q -.15(Fo)0 48 S 2.5(ra).15 G -(ll other types, it should be set to zero by writers and ignored)-2.5 E -(by readers.)0 60 Q(<p><dt><i></i><i>magic</i><dd>)0 72 Q 0 Cg EP -%%Page: 46 46 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Contains the magic v)0 12 Q(alue)-.25 E -.74(``) -0 24 S(ustar').74 E(')-.74 E(follo)0 36 Q -(wed by a NUL byte to indicate that this is a POSIX standard archi)-.25 -E -.15(ve)-.25 G(.).15 E -(Full compliance requires the uname and gname \214elds be properly set.) -0 48 Q(<p><dt><i></i><i>v)0 60 Q(ersion</i><dd>)-.15 E -1.11(Ve)0 72 S -(rsion.)1.11 E 0 Cg EP -%%Page: 47 47 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(This should be)0 12 Q -.74(``)0 24 S(00').74 E -(')-.74 E(\(tw)0 36 Q 2.5(oc)-.1 G -(opies of the ASCII digit zero\) for POSIX standard archi)-2.5 E -.15 -(ve)-.25 G(s.).15 E(<p><dt><i></i><i>uname</i><i></i>,<i> gname</i><dd>) -0 48 Q(User and group names, as null-terminated ASCII strings.)0 60 Q -(These should be used in preference to the uid/gid v)0 72 Q(alues)-.25 E -0 Cg EP -%%Page: 48 48 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(when the)0 12 Q 2.5(ya)-.15 G -(re set and the corresponding names e)-2.5 E(xist on)-.15 E(the system.) -0 24 Q(<p><dt><i></i><i>de)0 36 Q(vmajor</i><i></i>,<i> de)-.25 E -(vminor</i><dd>)-.25 E(Major and minor numbers for character de)0 48 Q -(vice or block de)-.25 E(vice entry)-.25 E(.)-.65 E -(<p><dt><i></i><i>name</i><i></i>,<i> pre\214x</i><dd>)0 60 Q -(If the pathname is too long to \214t in the 100 bytes pro)0 72 Q -(vided by the standard)-.15 E 0 Cg EP -%%Page: 49 49 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(format, it can be split at an)0 12 Q(y)-.15 E -(<code></code><code>/</code>)0 24 Q -(character with the \214rst portion going into the pre\214x \214eld.)0 -36 Q(If the pre\214x \214eld is not empty)0 48 Q 2.5(,t)-.65 G -(he reader will prepend)-2.5 E(the pre\214x v)0 60 Q(alue and a)-.25 E -(<code></code><code>/</code>)0 72 Q 0 Cg EP -%%Page: 50 50 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(character to the re)0 12 Q -(gular name \214eld to obtain the full pathname.)-.15 E -(The standard does not require a trailing)0 24 Q -(<code></code><code>/</code>)0 36 Q -(character on directory names, though most implementations still)0 48 Q -(include this for compatibility reasons.)0 60 Q(</dl>)0 72 Q 0 Cg EP -%%Page: 51 51 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q -(Note that all unused bytes must be set to)0 24 Q -(<code></code><code>NUL</code>.)0 36 Q(<p>)36 48 Q -(Field termination is speci\214ed slightly dif)0 60 Q(ferently by POSIX) --.25 E(than by pre)0 72 Q(vious implementations.)-.25 E 0 Cg EP -%%Page: 52 52 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The)0 12 Q(<i></i><i>magic</i>,)0 24 Q -(<i></i><i>uname</i>,)0 36 Q(and)0 48 Q(<i></i><i>gname</i>)0 60 Q -(\214elds must ha)0 72 Q .3 -.15(ve a t)-.2 H(railing).15 E 0 Cg EP -%%Page: 53 53 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<code></code><code>NUL</code>.)0 12 Q(The)0 24 Q -(<i></i><i>pathname</i>,)0 36 Q(<i></i><i>linkname</i>,)0 48 Q(and)0 60 -Q(<i></i><i>pre\214x</i>)0 72 Q 0 Cg EP -%%Page: 54 54 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\214elds must ha)0 12 Q .3 -.15(ve a t)-.2 H -(railing).15 E(<code></code><code>NUL</code>)0 24 Q(unless the)0 36 Q -2.5<798c>-.15 G(ll the entire \214eld.)-2.5 E(\(In particular)0 48 Q 2.5 -(,i)-.4 G 2.5(ti)-2.5 G 2.5(sp)-2.5 G -(ossible to store a 256-character pathname if it)-2.5 E(happens to ha)0 -60 Q .3 -.15(ve a)-.2 H(<code></code><code>/</code>)0 72 Q 0 Cg EP -%%Page: 55 55 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(as the 156th character)0 12 Q(.\))-.55 E(POSIX \ -requires numeric \214elds to be zero-padded in the front, and requires)0 -24 Q(them to be terminated with either space or)0 36 Q -(<code></code><code>NUL</code>)0 48 Q(characters.)0 60 Q(<p>)36 72 Q 0 -Cg EP -%%Page: 56 56 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Currently)0 12 Q 2.5(,m)-.65 G -(ost tar implementations comply with the ustar)-2.5 E -(format, occasionally e)0 24 Q(xtending it by adding ne)-.15 E 2.5<778c> --.25 G(elds to the)-2.5 E(blank area at the end of the header record.)0 -36 Q(<h4 id="P)36 48 Q(ax Interchange F)-.15 E(ormat">)-.15 E -.15(Pa)36 -60 S 2.5(xI).15 G(nterchange F)-2.5 E(ormat)-.15 E(</h4>)36 72 Q 0 Cg EP -%%Page: 57 57 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(There are man)0 12 Q 2.5(ya)-.15 G(ttrib)-2.5 E -(utes that cannot be portably stored in a)-.2 E(POSIX ustar archi)0 24 Q --.15(ve)-.25 G(.).15 E(IEEE Std 1003.1-2001 \(`)2.5 36 Q -(`<font size="-1">POSIX</font>.1')-.74 E('\))-.74 E(de\214ned a)0 48 Q --.74(``)0 60 S(pax interchange format').74 E(')-.74 E(that uses tw)0 72 -Q 2.5(on)-.1 G .5 -.25(ew t)-2.5 H(ypes of entries to hold te).25 E -(xt-formatted)-.15 E 0 Cg EP -%%Page: 58 58 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(metadata that applies to follo)0 12 Q -(wing entries.)-.25 E(Note that a pax interchange format archi)0 24 Q .3 --.15(ve i)-.25 H 2.5(sau).15 G(star archi)-2.5 E .3 -.15(ve i)-.25 H 2.5 -(ne).15 G -.15(ve)-2.75 G(ry).15 E(respect.)0 36 Q(The ne)0 48 Q 2.5(wd) --.25 G(ata is stored in ustar)-2.5 E(-compatible archi)-.2 E .3 -.15 -(ve e)-.25 H(ntries that use the).15 E -.74(``)0 60 S(x').74 E(')-.74 E -(or)0 72 Q 0 Cg EP -%%Page: 59 59 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(g').74 E(')-.74 E(type\215ag.)0 -24 Q(In particular)0 36 Q 2.5(,o)-.4 G -(lder implementations that do not fully support these)-2.5 E -.15(ex)0 -48 S(tensions will e).15 E(xtract the metadata into re)-.15 E -(gular \214les, where the)-.15 E(metadata can be e)0 60 Q -(xamined as necessary)-.15 E(.)-.65 E(<p>)36 72 Q 0 Cg EP -%%Page: 60 60 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(An entry in a pax interchange format archi)0 12 -Q .3 -.15(ve c)-.25 H(onsists of one or).15 E(tw)0 24 Q 2.5(os)-.1 G -(tandard ustar entries, each with its o)-2.5 E(wn header and data.)-.25 -E(The \214rst optional entry stores the e)0 36 Q(xtended attrib)-.15 E -(utes)-.2 E(for the follo)0 48 Q(wing entry)-.25 E(.)-.65 E(This option\ -al \214rst entry has an "x" type\215ag and a size \214eld that)0 60 Q -(indicates the total size of the e)0 72 Q(xtended attrib)-.15 E(utes.) --.2 E 0 Cg EP -%%Page: 61 61 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The e)0 12 Q(xtended attrib)-.15 E -(utes themselv)-.2 E(es are stored as a series of te)-.15 E(xt-format) --.15 E(lines encoded in the portable UTF-8 encoding.)0 24 Q -(Each line consists of a decimal number)0 36 Q 2.5(,as)-.4 G(pace, a k) --2.5 E .3 -.15(ey s)-.1 H(tring, an equals).15 E(sign, a v)0 48 Q -(alue string, and a ne)-.25 E 2.5(wl)-.25 G(ine.)-2.5 E(The decimal num\ -ber indicates the length of the entire line, including the)0 60 Q -(initial length \214eld and the trailing ne)0 72 Q(wline.)-.25 E 0 Cg EP -%%Page: 62 62 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(An e)0 12 Q(xample of such a \214eld is:)-.15 E -(<br>)0 24 Q( )0 36 Q -(<code></code><code>25</code><code> ctime=1084839148.1212\\n</code>)0 48 -Q(<br>)0 60 Q -2.15 -.25(Ke y)0 72 T 2.5(si).25 G 2.5(na)-2.5 G(ll lo) --2.5 E(wercase are standard k)-.25 E -.15(ey)-.1 G(s.).15 E 0 Cg EP -%%Page: 63 63 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -1.11(Ve)0 12 S(ndors can add their o)1.11 E -(wn k)-.25 E -.15(ey)-.1 G 2.5(sb).15 G 2.5(yp)-2.5 G -(re\214xing them with an all uppercase)-2.5 E -.15(ve)0 24 S -(ndor name and a period.).15 E(Note that, unlik)0 36 Q 2.5(et)-.1 G -(he historic header)-2.5 E 2.5(,n)-.4 G(umeric v)-2.5 E -(alues are stored using)-.25 E(decimal, not octal.)0 48 Q 2.5(Ad)0 60 S -(escription of some common k)-2.5 E -.15(ey)-.1 G 2.5(sf).15 G(ollo)-2.5 -E(ws:)-.25 E(<dl compact>)0 72 Q 0 Cg EP -%%Page: 64 64 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b></b><b>atime</b><b></b>,<b> ctime</b>\ -<b></b>,<b> mtime</b><dd>)0 12 Q -(File access, inode change, and modi\214cation times.)0 24 Q -(These \214elds can be ne)0 36 Q -.05(ga)-.15 G(ti).05 E .3 -.15(ve o) --.25 H 2.5(ri).15 G(nclude a decimal point and a fractional v)-2.5 E -(alue.)-.25 E(<p><dt><b></b><b>uname</b><b></b>,<b> uid</b><b></b>,<b> \ -gname</b><b></b>,<b> gid</b><dd>)0 48 Q -(User name, group name, and numeric UID and GID v)0 60 Q(alues.)-.25 E -(The user name and group name stored here are encoded in UTF8)0 72 Q 0 -Cg EP -%%Page: 65 65 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and can thus include non-ASCII characters.)0 12 -Q(The UID and GID \214elds can be of arbitrary length.)0 24 Q -(<p><dt><b></b><b>linkpath</b><dd>)0 36 Q(The full path of the link)0 48 -Q(ed-to \214le.)-.1 E(Note that this is encoded in UTF8 and can thus in\ -clude non-ASCII characters.)0 60 Q(<p><dt><b></b><b>path</b><dd>)0 72 Q -0 Cg EP -%%Page: 66 66 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The full pathname of the entry)0 12 Q(.)-.65 E(\ -Note that this is encoded in UTF8 and can thus include non-ASCII charac\ -ters.)0 24 Q(<p><dt><b></b><b>realtime.*</b><b></b>,<b> security)0 36 Q -(.*</b><dd>)-.65 E(These k)0 48 Q -.15(ey)-.1 G 2.5(sa).15 G(re reserv) --2.5 E(ed and may be used for future standardization.)-.15 E -(<p><dt><b></b><b>size</b><dd>)0 60 Q(The size of the \214le.)0 72 Q 0 -Cg EP -%%Page: 67 67 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(Note that there is no length limit on this \214eld, allo)0 12 Q -(wing conforming)-.25 E(archi)0 24 Q -.15(ve)-.25 G 2.5(st).15 G 2.5(os) --2.5 G(tore \214les much lar)-2.5 E(ger than the historic 8GB limit.) --.18 E(<p><dt><b></b><b>SCHIL)0 36 Q -1.29(Y.)-1 G(*</b><dd>)1.29 E --1.11(Ve)0 48 S(ndor)1.11 E(-speci\214c attrib)-.2 E(utes used by Joer) --.2 E 2.5(gS)-.18 G(chilling')-2.5 E(s)-.55 E(<b>star</b>)0 60 Q -(implementation.)0 72 Q 0 Cg EP -%%Page: 68 68 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b></b><b>SCHIL)0 12 Q -1.29(Y.)-1 G -(acl.access</b><b></b>,<b> SCHIL)1.29 E -1.29(Y.)-1 G(acl.def)1.29 E -(ault</b><dd>)-.1 E(Stores the access and def)0 24 Q(ault A)-.1 E -(CLs as te)-.4 E(xtual strings in a format)-.15 E(that is an e)0 36 Q -(xtension of the format speci\214ed by POSIX.1e draft 17.)-.15 E -(In particular)0 48 Q 2.5(,e)-.4 G -(ach user or group access speci\214cation can include a fourth)-2.5 E -(colon-separated \214eld with the numeric UID or GID.)0 60 Q(This allo)0 -72 Q(ws A)-.25 E(CLs to be restored on systems that may not ha)-.4 E .3 --.15(ve c)-.2 H(omplete).15 E 0 Cg EP -%%Page: 69 69 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(user or group information a)0 12 Q -.25(va)-.2 G -(ilable \(such as when NIS/YP or LD).25 E(AP services)-.4 E -(are temporarily una)0 24 Q -.25(va)-.2 G(ilable\).).25 E -(<p><dt><b></b><b>SCHIL)0 36 Q -1.29(Y.)-1 G(de)1.29 E -(vminor</b><b></b>,<b> SCHIL)-.25 E -1.29(Y.)-1 G(de)1.29 E -(vmajor</b><dd>)-.25 E(The full minor and major numbers for de)0 48 Q -(vice nodes.)-.25 E(<p><dt><b></b><b>SCHIL)0 60 Q -1.29(Y.)-1 G -.25 -<668d>1.29 G(ags</b><dd>).25 E(The \214le \215ags.)0 72 Q 0 Cg EP -%%Page: 70 70 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><b></b><b>SCHIL)0 12 Q -1.29(Y.)-1 G -(realsize</b><dd>)1.29 E(The full size of the \214le on disk.)0 24 Q -(XXX e)0 36 Q(xplain? XXX)-.15 E(<p><dt><b></b><b>SCHIL)0 48 Q -1.29(Y.) --1 G(de)1.29 E -.65(v,)-.25 G(</b><b></b><b> SCHIL).65 E -1.29(Y.)-1 G -(ino</b><b></b>,<b> SCHIL)1.29 E -1.29(Y.)-1 G(nlinks</b><dd>)1.29 E -(The de)0 60 Q(vice number)-.25 E 2.5(,i)-.4 G(node number)-2.5 E 2.5 -(,a)-.4 G(nd link count for the entry)-2.5 E(.)-.65 E(In particular)0 72 -Q 2.5(,n)-.4 G(ote that a pax interchange format archi)-2.5 E .3 -.15 -(ve u)-.25 H(sing Joer).15 E(g)-.18 E 0 Cg EP -%%Page: 71 71 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(Schilling')0 12 Q(s)-.55 E(<b></b><b>SCHIL)0 24 -Q -1.29(Y.)-1 G(*</b>)1.29 E -.15(ex)0 36 S -(tensions can store all of the data from).15 E -(<i></i><i>struct</i><i> stat</i>.)0 48 Q(<p><dt><b></b><b>LIB)0 60 Q -(ARCHIVE.xattr)-.35 E(.</b><i></i><i>namespace</i><i></i>.<i>k)-.55 E --.15(ey)-.1 G(</i><dd>).15 E(Libarchi)0 72 Q .3 -.15(ve s)-.25 H -(tores POSIX.1e-style e).15 E(xtended attrib)-.15 E(utes using)-.2 E 0 -Cg EP -%%Page: 72 72 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.1(ke)0 12 S(ys of this form.)-.05 E(The)0 24 Q -(<i></i><i>k)0 36 Q -.15(ey)-.1 G(</i>).15 E -.25(va)0 48 S -(lue is URL-encoded:).25 E(All non-ASCII characters and the tw)0 60 Q -2.5(os)-.1 G(pecial characters)-2.5 E -.74(``)0 72 S(=').74 E(')-.74 E 0 -Cg EP -%%Page: 73 73 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and)0 12 Q -.74(``)0 24 S(%').74 E(')-.74 E -(are encoded as)0 36 Q -.74(``)0 48 S(%').74 E(')-.74 E(follo)0 60 Q -(wed by tw)-.25 E 2.5(ou)-.1 G(ppercase he)-2.5 E(xadecimal digits.)-.15 -E(The v)0 72 Q(alue of this k)-.25 E .3 -.15(ey i)-.1 H 2.5(st).15 G -(he e)-2.5 E(xtended attrib)-.15 E(ute v)-.2 E(alue)-.25 E 0 Cg EP -%%Page: 74 74 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(encoded in base 64.)0 12 Q -(XXX Detail the base-64 format here XXX)0 24 Q -(<p><dt><b></b><b>VENDOR.*</b><dd>)0 36 Q(XXX document other v)0 48 Q -(endor)-.15 E(-speci\214c e)-.2 E(xtensions XXX)-.15 E(</dl>)0 60 Q(<p>) -36 72 Q 0 Cg EP -%%Page: 75 75 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(An)0 12 Q 2.5(yv)-.15 G(alues stored in an e) --2.75 E(xtended attrib)-.15 E(ute o)-.2 E -.15(ve)-.15 G -(rride the corresponding).15 E -.25(va)0 24 S(lues in the re).25 E -(gular tar header)-.15 E(.)-.55 E -(Note that compliant readers should ignore the re)0 36 Q -(gular \214elds when the)-.15 E(y)-.15 E(are o)0 48 Q -.15(ve)-.15 G -(rridden.).15 E(This is important, as e)0 60 Q(xisting archi)-.15 E -.15 -(ve)-.25 G(rs are kno).15 E(wn to store non-compliant)-.25 E -.25(va)0 -72 S(lues in the standard header \214elds in this situation.).25 E 0 Cg -EP -%%Page: 76 76 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(There are no limits on length for an)0 12 Q 2.5 -(yo)-.15 G 2.5(ft)-2.5 G(hese \214elds.)-2.5 E(In particular)0 24 Q 2.5 -(,n)-.4 G(umeric \214elds can be arbitrarily lar)-2.5 E(ge.)-.18 E -(All te)0 36 Q(xt \214elds are encoded in UTF8.)-.15 E -(Compliant writers should store only portable 7-bit ASCII characters in) -0 48 Q(the standard ustar header and use e)0 60 Q(xtended)-.15 E(attrib) -0 72 Q(utes whene)-.2 E -.15(ve)-.25 G 2.5(rat).15 G -.15(ex)-2.5 G 2.5 -(tv).15 G(alue contains non-ASCII characters.)-2.75 E 0 Cg EP -%%Page: 77 77 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(In addition to the)0 24 Q -(<b></b><b>x</b>)0 36 Q(entry described abo)0 48 Q -.15(ve)-.15 G 2.5 -(,t).15 G(he pax interchange format)-2.5 E(also supports a)0 60 Q -(<b></b><b>g</b>)0 72 Q 0 Cg EP -%%Page: 78 78 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(entry)0 12 Q(.)-.65 E(The)0 24 Q -(<b></b><b>g</b>)0 36 Q(entry is identical in format, b)0 48 Q -(ut speci\214es attrib)-.2 E(utes that serv)-.2 E 2.5(ea)-.15 G(s)-2.5 E -(def)0 60 Q(aults for all subsequent archi)-.1 E .3 -.15(ve e)-.25 H -(ntries.).15 E(The)0 72 Q 0 Cg EP -%%Page: 79 79 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b></b><b>g</b>)0 12 Q -(entry is not widely used.)0 24 Q(<p>)36 36 Q(Besides the ne)0 48 Q(w) --.25 E(<b></b><b>x</b>)0 60 Q(and)0 72 Q 0 Cg EP -%%Page: 80 80 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b></b><b>g</b>)0 12 Q -(entries, the pax interchange format has a fe)0 24 Q 2.5(wo)-.25 G -(ther minor v)-2.5 E(ariations)-.25 E(from the earlier ustar format.)0 -36 Q(The most troubling one is that hardlinks are permitted to ha)0 48 Q --.15(ve)-.2 G(data follo)0 60 Q(wing them.)-.25 E(This allo)0 72 Q -(ws readers to restore an)-.25 E 2.5(yh)-.15 G -(ardlink to a \214le without)-2.5 E 0 Cg EP -%%Page: 81 81 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(ha)0 12 Q(ving to re)-.2 E(wind the archi)-.25 E -.3 -.15(ve t)-.25 H 2.5<6f8c>.15 G(nd an earlier entry)-2.5 E(.)-.65 E -(Ho)0 24 Q(we)-.25 E -.15(ve)-.25 G .8 -.4(r, i).15 H 2.5(tc).4 G -(reates complications for rob)-2.5 E(ust readers, as it is no longer)-.2 -E(clear whether or not the)0 36 Q 2.5(ys)-.15 G -(hould ignore the size \214eld for hardlink entries.)-2.5 E -(<h4 id="GNU T)36 48 Q(ar Archi)-.8 E -.15(ve)-.25 G(s">).15 E(GNU T)36 -60 Q(ar Archi)-.8 E -.15(ve)-.25 G(s).15 E(</h4>)36 72 Q 0 Cg EP -%%Page: 82 82 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(The GNU tar program started with a pre-POSIX format similar to that)0 -12 Q(described earlier and has e)0 24 Q(xtended it using se)-.15 E -.15 -(ve)-.25 G(ral dif).15 E(ferent mechanisms:)-.25 E(It added ne)0 36 Q -2.5<778c>-.25 G(elds to the empty space in the header \(some of which w) --2.5 E(as later)-.1 E(used by POSIX for con\215icting purposes\);)0 48 Q -(it allo)0 60 Q(wed the header to be continued o)-.25 E -.15(ve)-.15 G -2.5(rm).15 G(ultiple records;)-2.5 E(and it de\214ned ne)0 72 Q 2.5(we) --.25 G(ntries that modify follo)-2.5 E(wing entries)-.25 E 0 Cg EP -%%Page: 83 83 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(similar in principle to the)0 12 Q -(<b></b><b>x</b>)0 24 Q(entry described abo)0 36 Q -.15(ve)-.15 G 2.5 -(,b).15 G(ut each GNU special entry is single-purpose,)-2.7 E(unlik)0 48 -Q 2.5(et)-.1 G(he general-purpose)-2.5 E(<b></b><b>x</b>)0 60 Q -(entry\).)0 72 Q 0 Cg EP -%%Page: 84 84 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(As a result, GNU tar archi)0 12 Q -.15(ve)-.25 G -2.5(sa).15 G(re not POSIX compatible, although)-2.5 E -(more lenient POSIX-compliant readers can successfully e)0 24 Q -(xtract most)-.15 E(GNU tar archi)0 36 Q -.15(ve)-.25 G(s.).15 E -(<dl compact><dt><dd>)0 48 Q(<code>)0 60 Q(<pre>)0 72 Q 0 Cg EP -%%Page: 85 85 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(struct header_gnu_tar {)0 12 Q(char name[100];) -36 24 Q(char mode[8];)36 36 Q(char uid[8];)36 48 Q(char gid[8];)36 60 Q -(char size[12];)36 72 Q 0 Cg EP -%%Page: 86 86 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(char mtime[12];)36 12 Q(char checksum[8];)36 24 -Q(char type\215ag[1];)36 36 Q(char linkname[100];)36 48 Q -(char magic[6];)36 60 Q(char v)36 72 Q(ersion[2];)-.15 E 0 Cg EP -%%Page: 87 87 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(char uname[32];)36 12 Q(char gname[32];)36 24 Q -(char de)36 36 Q(vmajor[8];)-.25 E(char de)36 48 Q(vminor[8];)-.25 E -(char atime[12];)36 60 Q(char ctime[12];)36 72 Q 0 Cg EP -%%Page: 88 88 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(char of)36 12 Q(fset[12];)-.25 E -(char longnames[4];)36 24 Q(char unused[1];)36 36 Q(struct {)36 48 Q -(char of)72 60 Q(fset[12];)-.25 E(char numbytes[12];)72 72 Q 0 Cg EP -%%Page: 89 89 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 2.5(}s)36 12 S(parse[4];)-2.5 E(char ise)36 24 Q -(xtended[1];)-.15 E(char realsize[12];)36 36 Q(char pad[17];)36 48 Q(};) -0 60 Q(</pre>)0 72 Q 0 Cg EP -%%Page: 90 90 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</code>)0 12 Q(</dl>)0 24 Q(<dl compact>)0 36 Q -(<p><dt><i></i><i>type\215ag</i><dd>)0 48 Q(GNU tar uses the follo)0 60 -Q(wing special entry types, in addition to)-.25 E -(those de\214ned by POSIX:)0 72 Q 0 Cg EP -%%Page: 91 91 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<dl compact>)0 12 Q(<p><dt>7<dd>)0 24 Q -(GNU tar treats type "7" records identically to type "0" records,)0 36 Q --.15(ex)0 48 S(cept on one obscure R).15 E -.18(TO)-.6 G 2.5(Sw).18 G -(here the)-2.5 E 2.5(ya)-.15 G(re used to indicate the)-2.5 E -(pre-allocation of a contiguous \214le on disk.)0 60 Q(<p><dt>D<dd>)0 72 -Q 0 Cg EP -%%Page: 92 92 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(This indicates a directory entry)0 12 Q(.)-.65 E -(Unlik)0 24 Q 2.5(et)-.1 G(he POSIX-standard "5")-2.5 E -(type\215ag, the header is follo)0 36 Q -(wed by data records listing the names)-.25 E -(of \214les in this directory)0 48 Q(.)-.65 E -(Each name is preceded by an ASCII "Y")0 60 Q -(if the \214le is stored in this archi)0 72 Q .3 -.15(ve o)-.25 H 2.5 -(r").15 G(N" if the \214le is not)-2.5 E 0 Cg EP -%%Page: 93 93 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(stored in this archi)0 12 Q -.15(ve)-.25 G(.).15 -E(Each name is terminated with a null, and)0 24 Q(an e)0 36 Q -(xtra null marks the end of the name list.)-.15 E(The purpose of this)0 -48 Q(entry is to support incremental backups; a program restoring from)0 -60 Q(such an archi)0 72 Q .3 -.15(ve m)-.25 H -(ay wish to delete \214les on disk that did not e).15 E(xist)-.15 E 0 Cg -EP -%%Page: 94 94 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(in the directory when the archi)0 12 Q .3 -.15 -(ve w)-.25 H(as made.).05 E(<p>)36 24 Q(Note that the "D" type\215ag sp\ -eci\214cally violates POSIX, which requires)0 36 Q -(that unrecognized type\215ags be restored as normal \214les.)0 48 Q -(In this case, restoring the "D" entry as a \214le could interfere)0 60 -Q(with subsequent creation of the lik)0 72 Q(e-named directory)-.1 E(.) --.65 E 0 Cg EP -%%Page: 95 95 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt>K<dd>)0 12 Q -(The data for this entry is a long linkname for the follo)0 24 Q -(wing re)-.25 E(gular entry)-.15 E(.)-.65 E(<p><dt>L<dd>)0 36 Q -(The data for this entry is a long pathname for the follo)0 48 Q -(wing re)-.25 E(gular entry)-.15 E(.)-.65 E(<p><dt>M<dd>)0 60 Q -(This is a continuation of the last \214le on the pre)0 72 Q(vious v) --.25 E(olume.)-.2 E 0 Cg EP -%%Page: 96 96 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(GNU multi-v)0 12 Q(olume archi)-.2 E -.15(ve) --.25 G 2.5(sg).15 G(uarantee that each v)-2.5 E(olume be)-.2 E -(gins with a v)-.15 E(alid)-.25 E(entry header)0 24 Q(.)-.55 E 1.6 -.8 -(To e)0 36 T(nsure this, a \214le may be split, with part stored at the\ - end of one v).8 E(olume,)-.2 E(and part stored at the be)0 48 Q -(ginning of the ne)-.15 E(xt v)-.15 E(olume.)-.2 E -(The "M" type\215ag indicates that this entry continues an e)0 60 Q -(xisting \214le.)-.15 E -(Such entries can only occur as the \214rst or second entry)0 72 Q 0 Cg -EP -%%Page: 97 97 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(in an archi)0 12 Q .3 -.15(ve \()-.25 H -(the latter only if the \214rst entry is a v).15 E(olume label\).)-.2 E -(The)0 24 Q(<i></i><i>size</i>)0 36 Q -(\214eld speci\214es the size of this entry)0 48 Q(.)-.65 E(The)0 60 Q -(<i></i><i>of)0 72 Q(fset</i>)-.25 E 0 Cg EP -%%Page: 98 98 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\214eld at bytes 369-380 speci\214es the of)0 12 -Q(fset where this \214le fragment)-.25 E(be)0 24 Q(gins.)-.15 E(The)0 36 -Q(<i></i><i>realsize</i>)0 48 Q -(\214eld speci\214es the total size of the \214le \(which must equal)0 -60 Q(<i></i><i>size</i>)0 72 Q 0 Cg EP -%%Page: 99 99 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(plus)0 12 Q(<i></i><i>of)0 24 Q(fset</i>\).)-.25 -E(When e)0 36 Q -(xtracting, GNU tar checks that the header \214le name is the one it is) --.15 E -.15(ex)0 48 S(pecting, that the header of).15 E -(fset is in the correct sequence, and that)-.25 E(the sum of of)0 60 Q -(fset and size is equal to realsize.)-.25 E(<p><dt>N<dd>)0 72 Q 0 Cg EP -%%Page: 100 100 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.8(Ty)0 12 S -(pe "N" records are no longer generated by GNU tar).8 E(.)-.55 E(The)0 -24 Q 2.5(yc)-.15 G(ontained a)-2.5 E -(list of \214les to be renamed or symlink)0 36 Q(ed after e)-.1 E -(xtraction; this w)-.15 E(as)-.1 E -(originally used to support long names.)0 48 Q -(The contents of this record)0 60 Q(are a te)0 72 Q -(xt description of the operations to be done, in the form)-.15 E 0 Cg EP -%%Page: 101 101 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(Rename %s to %s\\n').74 E(')-.74 -E(or)0 24 Q -.74(``)0 36 S(Symlink %s to %s\\n').74 E(';)-.74 E -(in either case, both)0 48 Q -(\214lenames are escaped using K&R C syntax.)0 60 Q -(Due to security concerns, "N" records are no)0 72 Q 2.5(wg)-.25 G -(enerally ignored)-2.5 E 0 Cg EP -%%Page: 102 102 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(when reading archi)0 12 Q -.15(ve)-.25 G(s.).15 -E(<p><dt>S<dd>)0 24 Q(This is a)0 36 Q -.74(``)0 48 S(sparse').74 E(') --.74 E(re)0 60 Q(gular \214le.)-.15 E -(Sparse \214les are stored as a series of fragments.)0 72 Q 0 Cg EP -%%Page: 103 103 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The header contains a list of fragment of)0 12 Q -(fset/length pairs.)-.25 E -(If more than four such entries are required, the header is)0 24 Q -.15 -(ex)0 36 S(tended as necessary with).15 E -.74(``)0 48 S -.15(ex).74 G -(tra').15 E(')-.74 E(header e)0 60 Q -(xtensions \(an older format that is no longer used\), or)-.15 E -.74 -(``)0 72 S(sparse').74 E(')-.74 E 0 Cg EP -%%Page: 104 104 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.15(ex)0 12 S(tensions.).15 E(<p><dt>V<dd>)0 24 -Q(The)0 36 Q(<i></i><i>name</i>)0 48 Q -(\214eld should be interpreted as a tape/v)0 60 Q(olume header name.)-.2 -E(This entry should generally be ignored on e)0 72 Q(xtraction.)-.15 E 0 -Cg EP -%%Page: 105 105 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</dl>)0 12 Q(<p><dt><i></i><i>magic</i><dd>)0 24 -Q(The magic \214eld holds the \214v)0 36 Q 2.5(ec)-.15 G(haracters)-2.5 -E -.74(``)0 48 S(ustar').74 E(')-.74 E(follo)0 60 Q(wed by a space.)-.25 -E(Note that POSIX ustar archi)0 72 Q -.15(ve)-.25 G 2.5(sh).15 G -2.25 --.2(av e)-2.5 H 2.5(at)2.7 G(railing null.)-2.5 E 0 Cg EP -%%Page: 106 106 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p><dt><i></i><i>v)0 12 Q(ersion</i><dd>)-.15 E -(The v)0 24 Q(ersion \214eld holds a space character follo)-.15 E -(wed by a null.)-.25 E(Note that POSIX ustar archi)0 36 Q -.15(ve)-.25 G -2.5(su).15 G(se tw)-2.5 E 2.5(oc)-.1 G(opies of the ASCII digit)-2.5 E --.74(``)0 48 S(0').74 E('.)-.74 E -(<p><dt><i></i><i>atime</i><i></i>,<i> ctime</i><dd>)0 60 Q -(The time the \214le w)0 72 Q(as last accessed and the time of)-.1 E 0 -Cg EP -%%Page: 107 107 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(last change of \214le information, stored in octal as with)0 12 Q -(<i></i><i>mtime</i>.)0 24 Q(<p><dt><i></i><i>longnames</i><dd>)0 36 Q -(This \214eld is apparently no longer used.)0 48 Q -(<p><dt>Sparse<i></i><i> of)0 60 Q -(fset</i><i> /</i><i></i><i> numbytes</i><dd>)-.25 E -(Each such structure speci\214es a single fragment of a sparse)0 72 Q 0 -Cg EP -%%Page: 108 108 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\214le.)0 12 Q(The tw)0 24 Q 2.5<6f8c>-.1 G -(elds store v)-2.5 E(alues as octal numbers.)-.25 E -(The fragments are each padded to a multiple of 512 bytes)0 36 Q -(in the archi)0 48 Q -.15(ve)-.25 G(.).15 E(On e)0 60 Q -(xtraction, the list of fragments is collected from the)-.15 E -(header \(including an)0 72 Q 2.5(ye)-.15 G -(xtension headers\), and the data)-2.65 E 0 Cg EP -%%Page: 109 109 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(is then read and written to the \214le at appropriate of)0 12 Q(fsets.) --.25 E(<p><dt><i></i><i>ise)0 24 Q(xtended</i><dd>)-.15 E -(If this is set to non-zero, the header will be follo)0 36 Q -(wed by additional)-.25 E -.74(``)0 48 S(sparse header').74 E(')-.74 E -(records.)0 60 Q(Each such record contains information about as man)0 72 -Q 2.5(ya)-.15 G 2.5(s2)-2.5 G 2.5(1a)-2.5 G(dditional)-2.5 E 0 Cg EP -%%Page: 110 110 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(sparse blocks as sho)0 12 Q(wn here:)-.25 E -(<dl compact><dt><dd>)0 24 Q(<code>)0 36 Q(<pre>)0 48 Q -(struct gnu_sparse_header {)0 60 Q(struct {)36 72 Q 0 Cg EP -%%Page: 111 111 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(char of)72 12 Q(fset[12];)-.25 E -(char numbytes[12];)72 24 Q 2.5(}s)36 36 S(parse[21];)-2.5 E 7.5 -(char ise)36 48 R(xtended[1];)-.15 E 7.5(char padding[7];)36 60 R(};)0 -72 Q 0 Cg EP -%%Page: 112 112 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</pre>)0 12 Q(</code>)0 24 Q(</dl>)0 36 Q -(<p><dt><i></i><i>realsize</i><dd>)0 48 Q 2.5(Ab)0 60 S -(inary representation of the \214le')-2.5 E 2.5(sc)-.55 G -(omplete size, with a much lar)-2.5 E(ger range)-.18 E -(than the POSIX \214le size.)0 72 Q 0 Cg EP -%%Page: 113 113 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(In particular)0 12 Q 2.5(,w)-.4 G(ith)-2.5 E -(<b></b><b>M</b>)0 24 Q -(type \214les, the current entry is only a portion of the \214le.)0 36 Q -(In that case, the POSIX size \214eld will indicate the size of this)0 -48 Q(entry; the)0 60 Q(<i></i><i>realsize</i>)0 72 Q 0 Cg EP -%%Page: 114 114 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(\214eld will indicate the total size of the \214le.)0 12 Q(</dl>)0 24 Q -(<h4 id="GNU tar pax archi)36 36 Q -.15(ve)-.25 G(s">).15 E -(GNU tar pax archi)36 48 Q -.15(ve)-.25 G(s).15 E(</h4>)36 60 Q -(GNU tar 1.14 \(XXX check this XXX\) and later will write)0 72 Q 0 Cg EP -%%Page: 115 115 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(pax interchange format archi)0 12 Q -.15(ve)-.25 -G 2.5(sw).15 G(hen you specify the)-2.5 E(<b>\255</b><b>-posix</b>)0 24 -Q(\215ag.)0 36 Q(This format uses custom k)0 48 Q -.15(ey)-.1 G -.1(wo) -.15 G(rds to store sparse \214le information.).1 E(There ha)0 60 Q .3 --.15(ve b)-.2 H(een three iterations of this support, referred to).15 E -(as)0 72 Q 0 Cg EP -%%Page: 116 116 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.74(``)0 12 S(0.0').74 E(',)-.74 E -.74(``)0 24 -S(0.1').74 E(',)-.74 E(and)0 36 Q -.74(``)0 48 S(1.0').74 E('.)-.74 E -(<dl compact>)0 60 Q -(<p><dt><b></b><b>GNU.sparse.numblocks</b><b></b>,<b> GNU.sparse.of)0 72 -Q(fset</b><b></b>,<b> GNU.sparse.numbytes</b><b></b>,<b> GNU.sparse.siz\ -e</b><dd>)-.25 E 0 Cg EP -%%Page: 117 117 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The)0 12 Q -.74(``)0 24 S(0.0').74 E(')-.74 E -(format used an initial)0 36 Q(<b></b><b>GNU.sparse.numblocks</b>)0 48 Q -(attrib)0 60 Q -(ute to indicate the number of blocks in the \214le, a pair of)-.2 E -(<b></b><b>GNU.sparse.of)0 72 Q(fset</b>)-.25 E 0 Cg EP -%%Page: 118 118 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and)0 12 Q(<b></b><b>GNU.sparse.numbytes</b>)0 -24 Q(to indicate the of)0 36 Q(fset and size of each block,)-.25 E -(and a single)0 48 Q(<b></b><b>GNU.sparse.size</b>)0 60 Q -(to indicate the full size of the \214le.)0 72 Q 0 Cg EP -%%Page: 119 119 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(This is not the same as the size in the tar header because the)0 12 Q -(latter v)0 24 Q(alue does not include the size of an)-.25 E 2.5(yh)-.15 -G(oles.)-2.5 E(This format required that the order of attrib)0 36 Q -(utes be preserv)-.2 E(ed and)-.15 E -(relied on readers accepting multiple appearances of the same attrib)0 -48 Q(ute)-.2 E(names, which is not of)0 60 Q -(\214cially permitted by the standards.)-.25 E -(<p><dt><b></b><b>GNU.sparse.map</b><dd>)0 72 Q 0 Cg EP -%%Page: 120 120 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The)0 12 Q -.74(``)0 24 S(0.1').74 E(')-.74 E -(format used a single attrib)0 36 Q(ute that stored a comma-separated) --.2 E(list of decimal numbers.)0 48 Q -(Each pair of numbers indicated the of)0 60 Q(fset and size, respecti) --.25 E -.15(ve)-.25 G(ly).15 E(,)-.65 E(of a block of data.)0 72 Q 0 Cg -EP -%%Page: 121 121 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(This does not w)0 12 Q(ork well if the archi)-.1 -E .3 -.15(ve i)-.25 H 2.5(se).15 G(xtracted by an archi)-2.65 E -.15(ve) --.25 G(r).15 E(that does not recognize this e)0 24 Q -(xtension, since man)-.15 E 2.5(yp)-.15 G(ax implementations)-2.5 E -(simply discard unrecognized attrib)0 36 Q(utes.)-.2 E(<p><dt><b></b><b\ ->GNU.sparse.major</b><b></b>,<b> GNU.sparse.minor</b><b></b>,<b> GNU.sp\ -arse.name</b><b></b>,<b> GNU.sparse.realsize</b><dd>)0 48 Q(The)0 60 Q --.74(``)0 72 S(1.0').74 E(')-.74 E 0 Cg EP -%%Page: 122 122 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(format stores the sparse block map in one or more 512-byte blocks)0 12 -Q(prepended to the \214le data in the entry body)0 24 Q(.)-.65 E -(The pax attrib)0 36 Q(utes indicate the e)-.2 E(xistence of this map) --.15 E(\(via the)0 48 Q(<b></b><b>GNU.sparse.major</b>)0 60 Q(and)0 72 Q -0 Cg EP -%%Page: 123 123 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b></b><b>GNU.sparse.minor</b>)0 12 Q -(\214elds\))0 24 Q(and the full size of the \214le.)0 36 Q(The)0 48 Q -(<b></b><b>GNU.sparse.name</b>)0 60 Q -(holds the true name of the \214le.)0 72 Q 0 Cg EP -%%Page: 124 124 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF 1.6 -.8(To a)0 12 T -.2(vo).6 G -(id confusion, the name stored in the re).2 E(gular tar header)-.15 E -(is a modi\214ed name so that e)0 24 Q -(xtraction errors will be apparent)-.15 E(to users.)0 36 Q(</dl>)0 48 Q -(<h4 id="Solaris T)36 60 Q(ar">)-.8 E(Solaris T)36 72 Q(ar)-.8 E 0 Cg EP -%%Page: 125 125 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(</h4>)36 12 Q(XXX More Details Needed XXX)0 24 Q -(<p>)36 36 Q(Solaris tar \(be)0 48 Q -(ginning with SunOS XXX 5.7 ?? XXX\) supports an)-.15 E -.74(``)0 60 S --.15(ex).74 G(tended').15 E(')-.74 E -(format that is fundamentally similar to pax interchange format,)0 72 Q -0 Cg EP -%%Page: 126 126 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(with the follo)0 12 Q(wing dif)-.25 E(ferences:) --.25 E(<ul>)0 24 Q(<li>)0 36 Q(Extended attrib)0 48 Q -(utes are stored in an entry whose type is)-.2 E(<b></b><b>X</b>,)0 60 Q -(not)0 72 Q 0 Cg EP -%%Page: 127 127 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b></b><b>x</b>,)0 12 Q -(as used by pax interchange format.)0 24 Q -(The detailed format of this entry appears to be the same)0 36 Q -(as detailed abo)0 48 Q .3 -.15(ve f)-.15 H(or the).15 E -(<b></b><b>x</b>)0 60 Q(entry)0 72 Q(.)-.65 E 0 Cg EP -%%Page: 128 128 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<li>)0 12 Q(An additional)0 24 Q -(<b></b><b>A</b>)0 36 Q(entry is used to store an A)0 48 Q -(CL for the follo)-.4 E(wing re)-.25 E(gular entry)-.15 E(.)-.65 E -(The body of this entry contains a se)0 60 Q -.15(ve)-.25 G -(n-digit octal number).15 E(follo)0 72 Q(wed by a zero byte, follo)-.25 -E(wed by the)-.25 E 0 Cg EP -%%Page: 129 129 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(te)0 12 Q(xtual A)-.15 E(CL description.)-.4 E -(The octal v)0 24 Q(alue is the number of A)-.25 E(CL entries)-.4 E -(plus a constant that indicates the A)0 36 Q(CL type: 01000000)-.4 E -(for POSIX.1e A)0 48 Q(CLs and 03000000 for NFSv4 A)-.4 E(CLs.)-.4 E -(</ul>)0 60 Q(<h4 id="AIX T)36 72 Q(ar">)-.8 E 0 Cg EP -%%Page: 130 130 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(AIX T)36 12 Q(ar)-.8 E(</h4>)36 24 Q -(XXX More details needed XXX)0 36 Q(<h4 id="Mac OS X T)36 48 Q(ar">)-.8 -E(Mac OS X T)36 60 Q(ar)-.8 E(</h4>)36 72 Q 0 Cg EP -%%Page: 131 131 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The tar distrib)0 12 Q(uted with Apple')-.2 E -2.5(sM)-.55 G(ac OS X stores most re)-2.5 E(gular \214les)-.15 E(as tw)0 -24 Q 2.5(os)-.1 G(eparate entries in the tar archi)-2.5 E -.15(ve)-.25 G -(.).15 E(The tw)0 36 Q 2.5(oe)-.1 G(ntries ha)-2.5 E .3 -.15(ve t)-.2 H -(he same name e).15 E(xcept that the \214rst)-.15 E(one has)0 48 Q -.74 -(``)0 60 S(._').74 E(')-.74 E(added to the be)0 72 Q -(ginning of the name.)-.15 E 0 Cg EP -%%Page: 132 132 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(This \214rst entry stores the)0 12 Q -.74(``)0 -24 S(resource fork').74 E(')-.74 E(with additional attrib)0 36 Q -(utes for the \214le.)-.2 E(The Mac OS X)0 48 Q(<b>Cop)0 60 Q -(yFile</b>\(<code></code>\))-.1 E -(API is used to separate a \214le on disk into separate)0 72 Q 0 Cg EP -%%Page: 133 133 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -(resource and data streams and to reassemble those separate)0 12 Q -(streams when the \214le is restored to disk.)0 24 Q -(<h4 id="Other Extensions">)36 36 Q(Other Extensions)36 48 Q(</h4>)36 60 -Q(One ob)0 72 Q(vious e)-.15 E -(xtension to increase the size of \214les is to)-.15 E 0 Cg EP -%%Page: 134 134 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(eliminate the terminating characters from the v) -0 12 Q(arious)-.25 E(numeric \214elds.)0 24 Q -.15(Fo)0 36 S 2.5(re).15 -G(xample, the standard only allo)-2.65 E(ws the size \214eld to contain) --.25 E(11 octal digits, reserving the twelfth byte for a trailing)0 48 Q -(NUL character)0 60 Q(.)-.55 E(Allo)0 72 Q(wing 12 octal digits allo) --.25 E(ws \214le sizes up to 64 GB.)-.25 E 0 Cg EP -%%Page: 135 135 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(Another e)0 24 Q -(xtension, utilized by GNU tar)-.15 E 2.5(,s)-.4 G(tar)-2.5 E 2.5(,a)-.4 -G(nd other ne)-2.5 E(wer)-.25 E(<b>tar</b>)0 36 Q(implementations, perm\ -its binary numbers in the standard numeric \214elds.)0 48 Q -(This is \215agged by setting the high bit of the \214rst byte.)0 60 Q -(This permits 95-bit v)0 72 Q(alues for the length and time \214elds) --.25 E 0 Cg EP -%%Page: 136 136 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(and 63-bit v)0 12 Q -(alues for the uid, gid, and de)-.25 E(vice numbers.)-.25 E -(GNU tar supports this e)0 24 Q(xtension for the)-.15 E -(length, mtime, ctime, and atime \214elds.)0 36 Q(Joer)0 48 Q 2.5(gS) --.18 G(chilling')-2.5 E 2.5(ss)-.55 G(tar program supports this e)-2.5 E -(xtension for)-.15 E(all numeric \214elds.)0 60 Q(Note that this e)0 72 -Q(xtension is lar)-.15 E(gely obsoleted by the e)-.18 E(xtended attrib) --.15 E(ute)-.2 E 0 Cg EP -%%Page: 137 137 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(record pro)0 12 Q -(vided by the pax interchange format.)-.15 E(<p>)36 24 Q -(Another early GNU e)0 36 Q(xtension allo)-.15 E(wed base-64 v)-.25 E -(alues rather than octal.)-.25 E(This e)0 48 Q(xtension w)-.15 E -(as short-li)-.1 E -.15(ve)-.25 G 2.5(da).15 G -(nd is no longer supported by an)-2.5 E(y)-.15 E(implementation.)0 60 Q -(<h3 id="SEE ALSO">)36 72 Q 0 Cg EP -%%Page: 138 138 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(SEE ALSO)36 12 Q(</h3>)36 24 Q -(<a href="../html1/ar)0 36 Q(.html">ar\(1\)</a>,)-.55 E -(<a href="../html1/pax.html">pax\(1\)</a>,)0 48 Q(<a href="../html1/tar) -0 60 Q(.html">tar\(1\)</a>)-.55 E(<h3 id="ST)36 72 Q(AND)-.93 E(ARDS">) --.4 E 0 Cg EP -%%Page: 139 139 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(ST)36 12 Q(AND)-.93 E(ARDS)-.4 E(</h3>)36 24 Q -(The)0 36 Q(<b>tar</b>)0 48 Q -(utility is no longer a part of POSIX or the Single Unix Standard.)0 60 -Q(It last appeared in)0 72 Q 0 Cg EP -%%Page: 140 140 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -1.11(Ve)2.5 12 S -(rsion 2 of the Single UNIX Speci\214cation \(`)1.11 E(`SUSv2')-.74 E -('\) .)-.74 E(It has been supplanted in subsequent standards by)0 24 Q -(<a href="../html1/pax.html">pax\(1\)</a>.)0 36 Q -(The ustar format is currently part of the speci\214cation for the)0 48 -Q(<a href="../html1/pax.html">pax\(1\)</a>)0 60 Q(utility)0 72 Q(.)-.65 -E 0 Cg EP -%%Page: 141 141 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(The pax interchange \214le format is ne)0 12 Q -2.5(ww)-.25 G(ith)-2.5 E(IEEE Std 1003.1-2001 \(`)2.5 24 Q -(`<font size="-1">POSIX</font>.1')-.74 E('\) .)-.74 E(<h3 id="HIST)36 36 -Q(OR)-.18 E(Y">)-.65 E(HIST)36 48 Q(OR)-.18 E(Y)-.65 E(</h3>)36 60 Q(A)0 -72 Q 0 Cg EP -%%Page: 142 142 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<b>tar</b>)0 12 Q(command appeared in Se)0 24 Q --.15(ve)-.25 G(nth Edition Unix, which w).15 E(as released in January) --.1 E 2.5(,1)-.65 G(979.)-2.5 E(It replaced the)0 36 Q(<b>tp</b>)0 48 Q -(program from F)0 60 Q(ourth Edition Unix which in turn replaced the) --.15 E(<b>tap</b>)0 72 Q 0 Cg EP -%%Page: 143 143 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(program from First Edition Unix.)0 12 Q -(John Gilmore')0 24 Q(s)-.55 E(<b>pdtar</b>)0 36 Q -(public-domain implementation \(circa 1987\) w)0 48 Q -(as highly in\215uential)-.1 E(and formed the basis of)0 60 Q -(<b>GNU</b><b>tar</b>)0 72 Q 0 Cg EP -%%Page: 144 144 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(\(circa 1988\).)0 12 Q(Joer)0 24 Q 2.5(gS)-.18 G -(hilling')-2.5 E(s)-.55 E(<b>star</b>)0 36 Q(archi)0 48 Q -.15(ve)-.25 G -2.5(ri).15 G 2.5(sa)-2.5 G(nother open-source \(GPL\) archi)-2.5 E -.15 -(ve)-.25 G 2.5(r\().15 G(originally de)-2.5 E -.15(ve)-.25 G(loped).15 E -(circa 1985\) which features complete support for pax interchange)0 60 Q -(format.)0 72 Q 0 Cg EP -%%Page: 145 145 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF(<p>)36 12 Q(This documentation w)0 24 Q -(as written as part of the)-.1 E(<b>libarchi)0 36 Q -.15(ve)-.25 G(</b>) -.15 E(and)0 48 Q(<b>bsdtar</b>)0 60 Q(project by)0 72 Q 0 Cg EP -%%Page: 146 146 -%%BeginPageSetup -BP -%%EndPageSetup -/F0 10/Times-Roman@0 SF -.35(Ti)0 12 S 2.5(mK).35 G -(ientzle <kientzle@FreeBSD.or)-2.5 E(g><br>.)-.18 E(</body>)0 24 Q -(</html>)0 36 Q 0 Cg EP -%%Trailer -end -%%EOF +<!-- Creator : groff version 1.19.2 --> +<!-- CreationDate: Sun Mar 14 19:50:35 2010 --> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" +"http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta name="generator" content="groff -Thtml, see www.gnu.org"> +<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> +<meta name="Content-Style" content="text/css"> +<style type="text/css"> + p { margin-top: 0; margin-bottom: 0; } + pre { margin-top: 0; margin-bottom: 0; } + table { margin-top: 0; margin-bottom: 0; } +</style> +<title></title> +</head> +<body> + +<hr> + + +<p valign="top">tar(5) FreeBSD File Formats Manual +tar(5)</p> + +<p style="margin-top: 1em" valign="top"><b>NAME</b></p> + +<p style="margin-left:8%;"><b>tar</b> — format of +tape archive files</p> + + +<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p> + +<p style="margin-left:8%;">The <b>tar</b> archive format +collects any number of files, directories, and other file +system objects (symbolic links, device nodes, etc.) into a +single stream of bytes. The format was originally designed +to be used with tape drives that operate with fixed-size +blocks, but is widely used as a general packaging +mechanism.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>General +Format</b> <br> +A <b>tar</b> archive consists of a series of 512-byte +records. Each file system object requires a header record +which stores basic metadata (pathname, owner, permissions, +etc.) and zero or more records containing any file data. The +end of the archive is indicated by two records consisting +entirely of zero bytes.</p> + +<p style="margin-left:8%; margin-top: 1em">For +compatibility with tape drives that use fixed block sizes, +programs that read or write tar files always read or write a +fixed number of records with each I/O operation. These +‘‘blocks’’ are always a multiple of +the record size. The maximum block size supported by early +implementations was 10240 bytes or 20 records. This is still +the default for most implementations although block sizes of +1MiB (2048 records) or larger are commonly used with modern +high-speed tape drives. (Note: the terms +‘‘block’’ and +‘‘record’’ here are not entirely +standard; this document follows the convention established +by John Gilmore in documenting <b>pdtar</b>.)</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Old-Style +Archive Format</b> <br> +The original tar archive format has been extended many times +to include additional information that various implementors +found necessary. This section describes the variant +implemented by the tar command included in Version 7 +AT&T UNIX, which seems to be the earliest widely-used +version of the tar program.</p> + +<p style="margin-left:8%; margin-top: 1em">The header +record for an old-style <b>tar</b> archive consists of the +following:</p> + +<p style="margin-left:17%; margin-top: 1em">struct +header_old_tar {</p> + +<table width="100%" border=0 rules="none" frame="void" + cellspacing="0" cellpadding="0"> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char name[100];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char mode[8];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char uid[8];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char gid[8];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char size[12];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char mtime[12];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char checksum[8];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char linkflag[1];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char linkname[100];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char pad[255];</p></td> +<td width="58%"> +</td> +</table> + +<p style="margin-left:17%;">};</p> + +<p style="margin-left:8%;">All unused bytes in the header +record are filled with nulls.</p> + +<p style="margin-top: 1em" valign="top"><i>name</i></p> + +<p style="margin-left:20%; margin-top: 1em">Pathname, +stored as a null-terminated string. Early tar +implementations only stored regular files (including +hardlinks to those files). One common early convention used +a trailing "/" character to indicate a directory +name, allowing directory permissions and owner information +to be archived and restored.</p> + +<p style="margin-top: 1em" valign="top"><i>mode</i></p> + +<p style="margin-left:20%; margin-top: 1em">File mode, +stored as an octal number in ASCII.</p> + +<p style="margin-top: 1em" valign="top"><i>uid</i>, +<i>gid</i></p> + +<p style="margin-left:20%;">User id and group id of owner, +as octal numbers in ASCII.</p> + +<p style="margin-top: 1em" valign="top"><i>size</i></p> + +<p style="margin-left:20%; margin-top: 1em">Size of file, +as octal number in ASCII. For regular files only, this +indicates the amount of data that follows the header. In +particular, this field was ignored by early tar +implementations when extracting hardlinks. Modern writers +should always store a zero length for hardlink entries.</p> + +<p style="margin-top: 1em" valign="top"><i>mtime</i></p> + +<p style="margin-left:20%; margin-top: 1em">Modification +time of file, as an octal number in ASCII. This indicates +the number of seconds since the start of the epoch, 00:00:00 +UTC January 1, 1970. Note that negative values should be +avoided here, as they are handled inconsistently.</p> + + +<p style="margin-top: 1em" valign="top"><i>checksum</i></p> + +<p style="margin-left:20%;">Header checksum, stored as an +octal number in ASCII. To compute the checksum, set the +checksum field to all spaces, then sum all bytes in the +header using unsigned arithmetic. This field should be +stored as six octal digits followed by a null and a space +character. Note that many early implementations of tar used +signed arithmetic for the checksum field, which can cause +interoperability problems when transferring archives between +systems. Modern robust readers compute the checksum both +ways and accept the header if either computation +matches.</p> + +<p style="margin-top: 1em" valign="top"><i>linkflag</i>, +<i>linkname</i></p> + +<p style="margin-left:20%;">In order to preserve hardlinks +and conserve tape, a file with multiple links is only +written to the archive the first time it is encountered. The +next time it is encountered, the <i>linkflag</i> is set to +an ASCII ‘1’ and the <i>linkname</i> field holds +the first name under which this file appears. (Note that +regular files have a null value in the <i>linkflag</i> +field.)</p> + +<p style="margin-left:8%; margin-top: 1em">Early tar +implementations varied in how they terminated these fields. +The tar command in Version 7 AT&T UNIX used the +following conventions (this is also documented in early BSD +manpages): the pathname must be null-terminated; the mode, +uid, and gid fields must end in a space and a null byte; the +size and mtime fields must end in a space; the checksum is +terminated by a null and a space. Early implementations +filled the numeric fields with leading spaces. This seems to +have been common practice until the IEEE Std 1003.1-1988 +(‘‘POSIX.1’’) standard was released. +For best portability, modern implementations should fill the +numeric fields with leading zeros.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Pre-POSIX +Archives</b> <br> +An early draft of IEEE Std 1003.1-1988 +(‘‘POSIX.1’’) served as the basis +for John Gilmore’s <b>pdtar</b> program and many +system implementations from the late 1980s and early 1990s. +These archives generally follow the POSIX ustar format +described below with the following variations:</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:20%;">The magic value is +‘‘ustar ’’ (note the following +space). The version field contains a space character +followed by a null.</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:20%;">The numeric fields are +generally filled with leading spaces (not leading zeros as +recommended in the final standard).</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:20%;">The prefix field is often not +used, limiting pathnames to the 100 characters of old-style +archives.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>POSIX ustar +Archives</b> <br> +IEEE Std 1003.1-1988 (‘‘POSIX.1’’) +defined a standard tar file format to be read and written by +compliant implementations of tar(1). This format is often +called the ‘‘ustar’’ format, after +the magic value used in the header. (The name is an acronym +for ‘‘Unix Standard TAR’’.) It +extends the historic format with new fields:</p> + +<p style="margin-left:17%; margin-top: 1em">struct +header_posix_ustar {</p> + +<table width="100%" border=0 rules="none" frame="void" + cellspacing="0" cellpadding="0"> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char name[100];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char mode[8];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char uid[8];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char gid[8];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char size[12];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char mtime[12];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char checksum[8];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char typeflag[1];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char linkname[100];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char magic[6];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char version[2];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char uname[32];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char gname[32];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char devmajor[8];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char devminor[8];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char prefix[155];</p></td> +<td width="58%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char pad[12];</p></td> +<td width="58%"> +</td> +</table> + +<p style="margin-left:17%;">};</p> + + +<p style="margin-top: 1em" valign="top"><i>typeflag</i></p> + +<p style="margin-left:20%;">Type of entry. POSIX extended +the earlier <i>linkflag</i> field with several new type +values:</p> + +<p valign="top">‘‘0’’</p> + +<p style="margin-left:32%; margin-top: 1em">Regular file. +NUL should be treated as a synonym, for compatibility +purposes.</p> + +<p valign="top">‘‘1’’</p> + +<p style="margin-left:32%; margin-top: 1em">Hard link.</p> + +<p valign="top">‘‘2’’</p> + +<p style="margin-left:32%; margin-top: 1em">Symbolic +link.</p> + +<p valign="top">‘‘3’’</p> + +<p style="margin-left:32%; margin-top: 1em">Character +device node.</p> + +<p valign="top">‘‘4’’</p> + +<p style="margin-left:32%; margin-top: 1em">Block device +node.</p> + +<p valign="top">‘‘5’’</p> + +<p style="margin-left:32%; margin-top: 1em">Directory.</p> + +<p valign="top">‘‘6’’</p> + +<p style="margin-left:32%; margin-top: 1em">FIFO node.</p> + +<p valign="top">‘‘7’’</p> + +<p style="margin-left:32%; margin-top: 1em">Reserved.</p> + +<p valign="top">Other</p> + +<p style="margin-left:32%; margin-top: 1em">A +POSIX-compliant implementation must treat any unrecognized +typeflag value as a regular file. In particular, writers +should ensure that all entries have a valid filename so that +they can be restored by readers that do not support the +corresponding extension. Uppercase letters "A" +through "Z" are reserved for custom extensions. +Note that sockets and whiteout entries are not +archivable.</p> + +<p style="margin-left:20%;">It is worth noting that the +<i>size</i> field, in particular, has different meanings +depending on the type. For regular files, of course, it +indicates the amount of data following the header. For +directories, it may be used to indicate the total size of +all files in the directory, for use by operating systems +that pre-allocate directory space. For all other types, it +should be set to zero by writers and ignored by readers.</p> + +<p style="margin-top: 1em" valign="top"><i>magic</i></p> + +<p style="margin-left:20%; margin-top: 1em">Contains the +magic value ‘‘ustar’’ followed by a +NUL byte to indicate that this is a POSIX standard archive. +Full compliance requires the uname and gname fields be +properly set.</p> + +<p style="margin-top: 1em" valign="top"><i>version</i></p> + +<p style="margin-left:20%;">Version. This should be +‘‘00’’ (two copies of the ASCII +digit zero) for POSIX standard archives.</p> + +<p style="margin-top: 1em" valign="top"><i>uname</i>, +<i>gname</i></p> + +<p style="margin-left:20%;">User and group names, as +null-terminated ASCII strings. These should be used in +preference to the uid/gid values when they are set and the +corresponding names exist on the system.</p> + +<p style="margin-top: 1em" valign="top"><i>devmajor</i>, +<i>devminor</i></p> + +<p style="margin-left:20%;">Major and minor numbers for +character device or block device entry.</p> + +<p style="margin-top: 1em" valign="top"><i>name</i>, +<i>prefix</i></p> + +<p style="margin-left:20%;">If the pathname is too long to +fit in the 100 bytes provided by the standard format, it can +be split at any <i>/</i> character with the first portion +going into the prefix field. If the prefix field is not +empty, the reader will prepend the prefix value and a +<i>/</i> character to the regular name field to obtain the +full pathname. The standard does not require a trailing +<i>/</i> character on directory names, though most +implementations still include this for compatibility +reasons.</p> + +<p style="margin-left:8%; margin-top: 1em">Note that all +unused bytes must be set to NUL.</p> + +<p style="margin-left:8%; margin-top: 1em">Field +termination is specified slightly differently by POSIX than +by previous implementations. The <i>magic</i>, <i>uname</i>, +and <i>gname</i> fields must have a trailing NUL. The +<i>pathname</i>, <i>linkname</i>, and <i>prefix</i> fields +must have a trailing NUL unless they fill the entire field. +(In particular, it is possible to store a 256-character +pathname if it happens to have a <i>/</i> as the 156th +character.) POSIX requires numeric fields to be zero-padded +in the front, and requires them to be terminated with either +space or NUL characters.</p> + +<p style="margin-left:8%; margin-top: 1em">Currently, most +tar implementations comply with the ustar format, +occasionally extending it by adding new fields to the blank +area at the end of the header record.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Pax +Interchange Format</b> <br> +There are many attributes that cannot be portably stored in +a POSIX ustar archive. IEEE Std 1003.1-2001 +(‘‘POSIX.1’’) defined a +‘‘pax interchange format’’ that uses +two new types of entries to hold text-formatted metadata +that applies to following entries. Note that a pax +interchange format archive is a ustar archive in every +respect. The new data is stored in ustar-compatible archive +entries that use the ‘‘x’’ or +‘‘g’’ typeflag. In particular, older +implementations that do not fully support these extensions +will extract the metadata into regular files, where the +metadata can be examined as necessary.</p> + +<p style="margin-left:8%; margin-top: 1em">An entry in a +pax interchange format archive consists of one or two +standard ustar entries, each with its own header and data. +The first optional entry stores the extended attributes for +the following entry. This optional first entry has an +"x" typeflag and a size field that indicates the +total size of the extended attributes. The extended +attributes themselves are stored as a series of text-format +lines encoded in the portable UTF-8 encoding. Each line +consists of a decimal number, a space, a key string, an +equals sign, a value string, and a new line. The decimal +number indicates the length of the entire line, including +the initial length field and the trailing newline. An +example of such a field is:</p> + +<p style="margin-left:17%;">25 ctime=1084839148.1212\n</p> + +<p style="margin-left:8%;">Keys in all lowercase are +standard keys. Vendors can add their own keys by prefixing +them with an all uppercase vendor name and a period. Note +that, unlike the historic header, numeric values are stored +using decimal, not octal. A description of some common keys +follows:</p> + +<p style="margin-top: 1em" valign="top"><b>atime</b>, +<b>ctime</b>, <b>mtime</b></p> + +<p style="margin-left:20%;">File access, inode change, and +modification times. These fields can be negative or include +a decimal point and a fractional value.</p> + +<p style="margin-top: 1em" valign="top"><b>uname</b>, +<b>uid</b>, <b>gname</b>, <b>gid</b></p> + +<p style="margin-left:20%;">User name, group name, and +numeric UID and GID values. The user name and group name +stored here are encoded in UTF8 and can thus include +non-ASCII characters. The UID and GID fields can be of +arbitrary length.</p> + + +<p style="margin-top: 1em" valign="top"><b>linkpath</b></p> + +<p style="margin-left:20%;">The full path of the linked-to +file. Note that this is encoded in UTF8 and can thus include +non-ASCII characters.</p> + +<p style="margin-top: 1em" valign="top"><b>path</b></p> + +<p style="margin-left:20%; margin-top: 1em">The full +pathname of the entry. Note that this is encoded in UTF8 and +can thus include non-ASCII characters.</p> + +<p style="margin-top: 1em" valign="top"><b>realtime.*</b>, +<b>security.*</b></p> + +<p style="margin-left:20%;">These keys are reserved and may +be used for future standardization.</p> + +<p style="margin-top: 1em" valign="top"><b>size</b></p> + +<p style="margin-left:20%; margin-top: 1em">The size of the +file. Note that there is no length limit on this field, +allowing conforming archives to store files much larger than +the historic 8GB limit.</p> + + +<p style="margin-top: 1em" valign="top"><b>SCHILY.*</b></p> + +<p style="margin-left:20%;">Vendor-specific attributes used +by Joerg Schilling’s <b>star</b> implementation.</p> + + +<p style="margin-top: 1em" valign="top"><b>SCHILY.acl.access</b>, +<b>SCHILY.acl.default</b></p> + +<p style="margin-left:20%;">Stores the access and default +ACLs as textual strings in a format that is an extension of +the format specified by POSIX.1e draft 17. In particular, +each user or group access specification can include a fourth +colon-separated field with the numeric UID or GID. This +allows ACLs to be restored on systems that may not have +complete user or group information available (such as when +NIS/YP or LDAP services are temporarily unavailable).</p> + + +<p style="margin-top: 1em" valign="top"><b>SCHILY.devminor</b>, +<b>SCHILY.devmajor</b></p> + +<p style="margin-left:20%;">The full minor and major +numbers for device nodes.</p> + + +<p style="margin-top: 1em" valign="top"><b>SCHILY.fflags</b></p> + +<p style="margin-left:20%;">The file flags.</p> + + +<p style="margin-top: 1em" valign="top"><b>SCHILY.realsize</b></p> + +<p style="margin-left:20%;">The full size of the file on +disk. XXX explain? XXX</p> + +<p style="margin-top: 1em" valign="top"><b>SCHILY.dev, +SCHILY.ino</b>, <b>SCHILY.nlinks</b></p> + +<p style="margin-left:20%;">The device number, inode +number, and link count for the entry. In particular, note +that a pax interchange format archive using Joerg +Schilling’s <b>SCHILY.*</b> extensions can store all +of the data from <i>struct stat</i>.</p> + + +<p style="margin-top: 1em" valign="top"><b>LIBARCHIVE.xattr.</b><i>namespace</i>.<i>key</i></p> + +<p style="margin-left:20%;">Libarchive stores +POSIX.1e-style extended attributes using keys of this form. +The <i>key</i> value is URL-encoded: All non-ASCII +characters and the two special characters +‘‘=’’ and +‘‘%’’ are encoded as +‘‘%’’ followed by two uppercase +hexadecimal digits. The value of this key is the extended +attribute value encoded in base 64. XXX Detail the base-64 +format here XXX</p> + + +<p style="margin-top: 1em" valign="top"><b>VENDOR.*</b></p> + +<p style="margin-left:20%;">XXX document other +vendor-specific extensions XXX</p> + +<p style="margin-left:8%; margin-top: 1em">Any values +stored in an extended attribute override the corresponding +values in the regular tar header. Note that compliant +readers should ignore the regular fields when they are +overridden. This is important, as existing archivers are +known to store non-compliant values in the standard header +fields in this situation. There are no limits on length for +any of these fields. In particular, numeric fields can be +arbitrarily large. All text fields are encoded in UTF8. +Compliant writers should store only portable 7-bit ASCII +characters in the standard ustar header and use extended +attributes whenever a text value contains non-ASCII +characters.</p> + +<p style="margin-left:8%; margin-top: 1em">In addition to +the <b>x</b> entry described above, the pax interchange +format also supports a <b>g</b> entry. The <b>g</b> entry is +identical in format, but specifies attributes that serve as +defaults for all subsequent archive entries. The <b>g</b> +entry is not widely used.</p> + +<p style="margin-left:8%; margin-top: 1em">Besides the new +<b>x</b> and <b>g</b> entries, the pax interchange format +has a few other minor variations from the earlier ustar +format. The most troubling one is that hardlinks are +permitted to have data following them. This allows readers +to restore any hardlink to a file without having to rewind +the archive to find an earlier entry. However, it creates +complications for robust readers, as it is no longer clear +whether or not they should ignore the size field for +hardlink entries.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>GNU Tar +Archives</b> <br> +The GNU tar program started with a pre-POSIX format similar +to that described earlier and has extended it using several +different mechanisms: It added new fields to the empty space +in the header (some of which was later used by POSIX for +conflicting purposes); it allowed the header to be continued +over multiple records; and it defined new entries that +modify following entries (similar in principle to the +<b>x</b> entry described above, but each GNU special entry +is single-purpose, unlike the general-purpose <b>x</b> +entry). As a result, GNU tar archives are not POSIX +compatible, although more lenient POSIX-compliant readers +can successfully extract most GNU tar archives.</p> + +<p style="margin-left:17%; margin-top: 1em">struct +header_gnu_tar {</p> + +<table width="100%" border=0 rules="none" frame="void" + cellspacing="0" cellpadding="0"> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char name[100];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char mode[8];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char uid[8];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char gid[8];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char size[12];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char mtime[12];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char checksum[8];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char typeflag[1];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char linkname[100];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char magic[6];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char version[2];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char uname[32];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char gname[32];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char devmajor[8];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char devminor[8];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char atime[12];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char ctime[12];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char offset[12];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char longnames[4];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char unused[1];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">struct {</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> +</td> +<td width="12%"> + + +<p valign="top">char offset[12];</p></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> +</td> +<td width="12%"> + + +<p valign="top">char numbytes[12];</p></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">} sparse[4];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char isextended[1];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char realsize[12];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +<tr valign="top" align="left"> +<td width="29%"></td> +<td width="13%"> + + +<p valign="top">char pad[17];</p></td> +<td width="12%"></td> +<td width="46%"> +</td> +</table> + +<p style="margin-left:17%;">};</p> + + +<p style="margin-top: 1em" valign="top"><i>typeflag</i></p> + +<p style="margin-left:20%;">GNU tar uses the following +special entry types, in addition to those defined by +POSIX:</p> + +<p style="margin-top: 1em" valign="top">7</p> + +<p style="margin-left:32%; margin-top: 1em">GNU tar treats +type "7" records identically to type "0" +records, except on one obscure RTOS where they are used to +indicate the pre-allocation of a contiguous file on +disk.</p> + +<p style="margin-top: 1em" valign="top">D</p> + +<p style="margin-left:32%; margin-top: 1em">This indicates +a directory entry. Unlike the POSIX-standard "5" +typeflag, the header is followed by data records listing the +names of files in this directory. Each name is preceded by +an ASCII "Y" if the file is stored in this archive +or "N" if the file is not stored in this archive. +Each name is terminated with a null, and an extra null marks +the end of the name list. The purpose of this entry is to +support incremental backups; a program restoring from such +an archive may wish to delete files on disk that did not +exist in the directory when the archive was made.</p> + +<p style="margin-left:32%; margin-top: 1em">Note that the +"D" typeflag specifically violates POSIX, which +requires that unrecognized typeflags be restored as normal +files. In this case, restoring the "D" entry as a +file could interfere with subsequent creation of the +like-named directory.</p> + +<p style="margin-top: 1em" valign="top">K</p> + +<p style="margin-left:32%; margin-top: 1em">The data for +this entry is a long linkname for the following regular +entry.</p> + +<p style="margin-top: 1em" valign="top">L</p> + +<p style="margin-left:32%; margin-top: 1em">The data for +this entry is a long pathname for the following regular +entry.</p> + +<p style="margin-top: 1em" valign="top">M</p> + +<p style="margin-left:32%; margin-top: 1em">This is a +continuation of the last file on the previous volume. GNU +multi-volume archives guarantee that each volume begins with +a valid entry header. To ensure this, a file may be split, +with part stored at the end of one volume, and part stored +at the beginning of the next volume. The "M" +typeflag indicates that this entry continues an existing +file. Such entries can only occur as the first or second +entry in an archive (the latter only if the first entry is a +volume label). The <i>size</i> field specifies the size of +this entry. The <i>offset</i> field at bytes 369-380 +specifies the offset where this file fragment begins. The +<i>realsize</i> field specifies the total size of the file +(which must equal <i>size</i> plus <i>offset</i>). When +extracting, GNU tar checks that the header file name is the +one it is expecting, that the header offset is in the +correct sequence, and that the sum of offset and size is +equal to realsize.</p> + +<p style="margin-top: 1em" valign="top">N</p> + +<p style="margin-left:32%; margin-top: 1em">Type +"N" records are no longer generated by GNU tar. +They contained a list of files to be renamed or symlinked +after extraction; this was originally used to support long +names. The contents of this record are a text description of +the operations to be done, in the form ‘‘Rename +%s to %s\n’’ or ‘‘Symlink %s to +%s\n’’; in either case, both filenames are +escaped using K&R C syntax. Due to security concerns, +"N" records are now generally ignored when reading +archives.</p> + +<p style="margin-top: 1em" valign="top">S</p> + +<p style="margin-left:32%; margin-top: 1em">This is a +‘‘sparse’’ regular file. Sparse +files are stored as a series of fragments. The header +contains a list of fragment offset/length pairs. If more +than four such entries are required, the header is extended +as necessary with ‘‘extra’’ header +extensions (an older format that is no longer used), or +‘‘sparse’’ extensions.</p> + +<p style="margin-top: 1em" valign="top">V</p> + +<p style="margin-left:32%; margin-top: 1em">The <i>name</i> +field should be interpreted as a tape/volume header name. +This entry should generally be ignored on extraction.</p> + +<p style="margin-top: 1em" valign="top"><i>magic</i></p> + +<p style="margin-left:20%; margin-top: 1em">The magic field +holds the five characters ‘‘ustar’’ +followed by a space. Note that POSIX ustar archives have a +trailing null.</p> + +<p style="margin-top: 1em" valign="top"><i>version</i></p> + +<p style="margin-left:20%;">The version field holds a space +character followed by a null. Note that POSIX ustar archives +use two copies of the ASCII digit +‘‘0’’.</p> + +<p style="margin-top: 1em" valign="top"><i>atime</i>, +<i>ctime</i></p> + +<p style="margin-left:20%;">The time the file was last +accessed and the time of last change of file information, +stored in octal as with <i>mtime</i>.</p> + + +<p style="margin-top: 1em" valign="top"><i>longnames</i></p> + +<p style="margin-left:20%;">This field is apparently no +longer used.</p> + +<p style="margin-top: 1em" valign="top">Sparse <i>offset / +numbytes</i></p> + +<p style="margin-left:20%;">Each such structure specifies a +single fragment of a sparse file. The two fields store +values as octal numbers. The fragments are each padded to a +multiple of 512 bytes in the archive. On extraction, the +list of fragments is collected from the header (including +any extension headers), and the data is then read and +written to the file at appropriate offsets.</p> + + +<p style="margin-top: 1em" valign="top"><i>isextended</i></p> + +<p style="margin-left:20%;">If this is set to non-zero, the +header will be followed by additional ‘‘sparse +header’’ records. Each such record contains +information about as many as 21 additional sparse blocks as +shown here:</p> + +<p style="margin-left:29%; margin-top: 1em">struct +gnu_sparse_header {</p> + +<table width="100%" border=0 rules="none" frame="void" + cellspacing="0" cellpadding="0"> +<tr valign="top" align="left"> +<td width="42%"></td> +<td width="12%"> + + +<p valign="top">struct {</p></td> +<td width="12%"></td> +<td width="34%"> +</td> +<tr valign="top" align="left"> +<td width="42%"></td> +<td width="12%"> +</td> +<td width="12%"> + + +<p valign="top">char offset[12];</p></td> +<td width="34%"> +</td> +<tr valign="top" align="left"> +<td width="42%"></td> +<td width="12%"> +</td> +<td width="12%"> + + +<p valign="top">char numbytes[12];</p></td> +<td width="34%"> +</td> +<tr valign="top" align="left"> +<td width="42%"></td> +<td width="12%"> + + +<p valign="top">} sparse[21];</p></td> +<td width="12%"></td> +<td width="34%"> +</td> +<tr valign="top" align="left"> +<td width="42%"></td> +<td width="12%"> + + +<p valign="top">char isextended[1];</p></td> +<td width="12%"></td> +<td width="34%"> +</td> +<tr valign="top" align="left"> +<td width="42%"></td> +<td width="12%"> + + +<p valign="top">char padding[7];</p></td> +<td width="12%"></td> +<td width="34%"> +</td> +</table> + +<p style="margin-left:29%;">};</p> + + +<p style="margin-top: 1em" valign="top"><i>realsize</i></p> + +<p style="margin-left:20%;">A binary representation of the +file’s complete size, with a much larger range than +the POSIX file size. In particular, with <b>M</b> type +files, the current entry is only a portion of the file. In +that case, the POSIX size field will indicate the size of +this entry; the <i>realsize</i> field will indicate the +total size of the file.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>GNU tar pax +archives</b> <br> +GNU tar 1.14 (XXX check this XXX) and later will write pax +interchange format archives when you specify the +<b>−-posix</b> flag. This format uses custom keywords +to store sparse file information. There have been three +iterations of this support, referred to as +‘‘0.0’’, +‘‘0.1’’, and +‘‘1.0’’.</p> + + +<p style="margin-top: 1em" valign="top"><b>GNU.sparse.numblocks</b>, +<b>GNU.sparse.offset</b>, <b>GNU.sparse.numbytes</b>, +<b>GNU.sparse.size</b></p> + +<p style="margin-left:20%;">The +‘‘0.0’’ format used an initial +<b>GNU.sparse.numblocks</b> attribute to indicate the number +of blocks in the file, a pair of <b>GNU.sparse.offset</b> +and <b>GNU.sparse.numbytes</b> to indicate the offset and +size of each block, and a single <b>GNU.sparse.size</b> to +indicate the full size of the file. This is not the same as +the size in the tar header because the latter value does not +include the size of any holes. This format required that the +order of attributes be preserved and relied on readers +accepting multiple appearances of the same attribute names, +which is not officially permitted by the standards.</p> + + +<p style="margin-top: 1em" valign="top"><b>GNU.sparse.map</b></p> + +<p style="margin-left:20%;">The +‘‘0.1’’ format used a single +attribute that stored a comma-separated list of decimal +numbers. Each pair of numbers indicated the offset and size, +respectively, of a block of data. This does not work well if +the archive is extracted by an archiver that does not +recognize this extension, since many pax implementations +simply discard unrecognized attributes.</p> + + +<p style="margin-top: 1em" valign="top"><b>GNU.sparse.major</b>, +<b>GNU.sparse.minor</b>, <b>GNU.sparse.name</b>, +<b>GNU.sparse.realsize</b></p> + +<p style="margin-left:20%;">The +‘‘1.0’’ format stores the sparse +block map in one or more 512-byte blocks prepended to the +file data in the entry body. The pax attributes indicate the +existence of this map (via the <b>GNU.sparse.major</b> and +<b>GNU.sparse.minor</b> fields) and the full size of the +file. The <b>GNU.sparse.name</b> holds the true name of the +file. To avoid confusion, the name stored in the regular tar +header is a modified name so that extraction errors will be +apparent to users.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Solaris +Tar</b> <br> +XXX More Details Needed XXX</p> + +<p style="margin-left:8%; margin-top: 1em">Solaris tar +(beginning with SunOS XXX 5.7 ?? XXX) supports an +‘‘extended’’ format that is +fundamentally similar to pax interchange format, with the +following differences:</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:20%;">Extended attributes are stored +in an entry whose type is <b>X</b>, not <b>x</b>, as used by +pax interchange format. The detailed format of this entry +appears to be the same as detailed above for the <b>x</b> +entry.</p> + +<p valign="top"><b>•</b></p> + +<p style="margin-left:20%;">An additional <b>A</b> entry is +used to store an ACL for the following regular entry. The +body of this entry contains a seven-digit octal number +followed by a zero byte, followed by the textual ACL +description. The octal value is the number of ACL entries +plus a constant that indicates the ACL type: 01000000 for +POSIX.1e ACLs and 03000000 for NFSv4 ACLs.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>AIX Tar</b> +<br> +XXX More details needed XXX</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Mac OS X +Tar</b> <br> +The tar distributed with Apple’s Mac OS X stores most +regular files as two separate entries in the tar archive. +The two entries have the same name except that the first one +has ‘‘._’’ added to the beginning of +the name. This first entry stores the ‘‘resource +fork’’ with additional attributes for the file. +The Mac OS X <b>CopyFile</b>() API is used to separate a +file on disk into separate resource and data streams and to +reassemble those separate streams when the file is restored +to disk.</p> + +<p style="margin-left:8%; margin-top: 1em"><b>Other +Extensions</b> <br> +One obvious extension to increase the size of files is to +eliminate the terminating characters from the various +numeric fields. For example, the standard only allows the +size field to contain 11 octal digits, reserving the twelfth +byte for a trailing NUL character. Allowing 12 octal digits +allows file sizes up to 64 GB.</p> + +<p style="margin-left:8%; margin-top: 1em">Another +extension, utilized by GNU tar, star, and other newer +<b>tar</b> implementations, permits binary numbers in the +standard numeric fields. This is flagged by setting the high +bit of the first byte. This permits 95-bit values for the +length and time fields and 63-bit values for the uid, gid, +and device numbers. GNU tar supports this extension for the +length, mtime, ctime, and atime fields. Joerg +Schilling’s star program supports this extension for +all numeric fields. Note that this extension is largely +obsoleted by the extended attribute record provided by the +pax interchange format.</p> + +<p style="margin-left:8%; margin-top: 1em">Another early +GNU extension allowed base-64 values rather than octal. This +extension was short-lived and is no longer supported by any +implementation.</p> + +<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p> + +<p style="margin-left:8%;">ar(1), pax(1), tar(1)</p> + + +<p style="margin-top: 1em" valign="top"><b>STANDARDS</b></p> + +<p style="margin-left:8%;">The <b>tar</b> utility is no +longer a part of POSIX or the Single Unix Standard. It last +appeared in Version 2 of the Single UNIX Specification +(‘‘SUSv2’’). It has been supplanted +in subsequent standards by pax(1). The ustar format is +currently part of the specification for the pax(1) utility. +The pax interchange file format is new with IEEE Std +1003.1-2001 (‘‘POSIX.1’’).</p> + +<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p> + +<p style="margin-left:8%;">A <b>tar</b> command appeared in +Seventh Edition Unix, which was released in January, 1979. +It replaced the <b>tp</b> program from Fourth Edition Unix +which in turn replaced the <b>tap</b> program from First +Edition Unix. John Gilmore’s <b>pdtar</b> +public-domain implementation (circa 1987) was highly +influential and formed the basis of <b>GNU tar</b> (circa +1988). Joerg Shilling’s <b>star</b> archiver is +another open-source (GPL) archiver (originally developed +circa 1985) which features complete support for pax +interchange format.</p> + +<p style="margin-left:8%; margin-top: 1em">This +documentation was written as part of the <b>libarchive</b> +and <b>bsdtar</b> project by Tim Kientzle +⟨kientzle@FreeBSD.org⟩.</p> + + +<p style="margin-left:8%; margin-top: 1em">FreeBSD 9.0 +December 27, 2009 FreeBSD 9.0</p> +<hr> +</body> +</html> |