intern.texi
来自「gnu tar 源码包。 tar 软件是 Unix 系统下的一个打包软件」· TEXI 代码 · 共 334 行 · 第 1/2 页
TEXI
334 行
used to handle a sparse file:The @code{sp} is an array of @code{struct sparse}. Each @code{structsparse} contains two 12-character strings which represent an offsetinto the file and a number of bytes to be written at that offset.The offset is absolute, and not relative to the offset in precedingarray element.The header can hold four of these @code{struct sparse} at the moment;if more are needed, they are not stored in the header.The @code{isextended} flag is set when an @code{extended_header}is needed to deal with a file. Note that this means that this flagcan only be set when dealing with a sparse file, and it is only setin the event that the description of the file will not fit in theallotted room for sparse structures in the header. In other words,an extended_header is needed.The @code{extended_header} structure is used for sparse files whichneed more sparse structures than can fit in the header. The header canfit 4 such structures; if more are needed, the flag @code{isextended}gets set and the next block is an @code{extended_header}.Each @code{extended_header} structure contains an array of 21sparse structures, along with a similar @code{isextended} flagthat the header had. There can be an indeterminate number of such@code{extended_header}s to describe a sparse file.@table @asis@item @code{REGTYPE}@itemx @code{AREGTYPE}These flags represent a regular file. In order to be compatiblewith older versions of @command{tar}, a @code{typeflag} value of@code{AREGTYPE} should be silently recognized as a regular file.New archives should be created using @code{REGTYPE}. Also, forbackward compatibility, @command{tar} treats a regular file whose nameends with a slash as a directory.@item @code{LNKTYPE}This flag represents a file linked to another file, of any type,previously archived. Such files are identified in Unix by eachfile having the same device and inode number. The linked-to name isspecified in the @code{linkname} field with a trailing null.@item @code{SYMTYPE}This represents a symbolic link to another file. The linked-to nameis specified in the @code{linkname} field with a trailing null.@item @code{CHRTYPE}@itemx @code{BLKTYPE}These represent character special files and block special filesrespectively. In this case the @code{devmajor} and @code{devminor}fields will contain the major and minor device numbers respectively.Operating systems may map the device specifications to their ownlocal specification, or may ignore the entry.@item @code{DIRTYPE}This flag specifies a directory or sub-directory. The directoryname in the @code{name} field should end with a slash. On systems wheredisk allocation is performed on a directory basis, the @code{size} fieldwill contain the maximum number of bytes (which may be rounded tothe nearest disk block allocation unit) which the directory mayhold. A @code{size} field of zero indicates no such limiting. Systemswhich do not support limiting in this manner should ignore the@code{size} field.@item @code{FIFOTYPE}This specifies a FIFO special file. Note that the archiving of aFIFO file archives the existence of this file and not its contents.@item @code{CONTTYPE}This specifies a contiguous file, which is the same as a normalfile except that, in operating systems which support it, all itsspace is allocated contiguously on the disk. Operating systemswhich do not allow contiguous allocation should silently treat thistype as a normal file.@item @code{A} @dots{} @code{Z}These are reserved for custom implementations. Some of these areused in the @acronym{GNU} modified format, as described below.@end tableOther values are reserved for specification in future revisions ofthe P1003 standard, and should not be used by any @command{tar} program.The @code{magic} field indicates that this archive was output inthe P1003 archive format. If this field contains @code{TMAGIC},the @code{uname} and @code{gname} fields will contain the ASCIIrepresentation of the owner and group of the file respectively.If found, the user and group @acronym{ID}s are used rather than the values inthe @code{uid} and @code{gid} fields.For references, see ISO/IEC 9945-1:1990 or IEEE Std 1003.1-1990, pages169-173 (section 10.1) for @cite{Archive/Interchange File Format}; andIEEE Std 1003.2-1992, pages 380-388 (section 4.48) and pages 936-940(section E.4.48) for @cite{pax - Portable archive interchange}.@node Extensions@unnumberedsec @acronym{GNU} Extensions to the Archive Format@UNREVISEDThe @acronym{GNU} format uses additional file types to describe new types offiles in an archive. These are listed below.@table @code@item GNUTYPE_DUMPDIR@itemx 'D'This represents a directory and a list of files created by the@option{--incremental} (@option{-G}) option. The @code{size} field gives the totalsize of the associated list of files. Each file name is preceded byeither a @samp{Y} (the file should be in this archive) or an @samp{N}.(The file is a directory, or is not stored in the archive.) Each filename is terminated by a null. There is an additional null after thelast file name.@item GNUTYPE_MULTIVOL@itemx 'M'This represents a file continued from another volume of a multi-volumearchive created with the @option{--multi-volume} (@option{-M}) option. The originaltype of the file is not given here. The @code{size} field gives themaximum size of this piece of the file (assuming the volume doesnot end before the file is written out). The @code{offset} fieldgives the offset from the beginning of the file where this part ofthe file begins. Thus @code{size} plus @code{offset} should equalthe original size of the file.@item GNUTYPE_SPARSE@itemx 'S'This flag indicates that we are dealing with a sparse file. Notethat archiving a sparse file requires special operations to findholes in the file, which mark the positions of these holes, alongwith the number of bytes of data to be found after the hole.@item GNUTYPE_VOLHDR@itemx 'V'This file type is used to mark the volume header that was given withthe @option{--label=@var{archive-label}} (@option{-V @var{archive-label}}) option when the archive was created. The @code{name}field contains the @code{name} given after the @option{--label=@var{archive-label}} (@option{-V @var{archive-label}}) option.The @code{size} field is zero. Only the first file in each volumeof an archive should have this type.@end tableYou may have trouble reading a @acronym{GNU} format archive on anon-@acronym{GNU} system if the options @option{--incremental} (@option{-G}),@option{--multi-volume} (@option{-M}), @option{--sparse} (@option{-S}), or @option{--label=@var{archive-label}} (@option{-V @var{archive-label}}) wereused when writing the archive. In general, if @command{tar} does notuse the @acronym{GNU}-added fields of the header, other versions of@command{tar} should be able to read the archive. Otherwise, the@command{tar} program will give an error, the most likely one being achecksum error.@node Sparse Formats@unnumberedsec Storing Sparse Files@include sparse.texi@node Snapshot Files@unnumberedsec Format of the Incremental Snapshot Files@include snapshot.texi@node Dumpdir@unnumberedsec Dumpdir@include dumpdir.texi
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?