dumpdir.texi

来自「gnu tar 源码包。 tar 软件是 Unix 系统下的一个打包软件」· TEXI 代码 · 共 133 行

TEXI
133
字号
@c This is part of the paxutils manual.@c Copyright (C) 2006, 2007 Free Software Foundation, Inc.@c Written by Sergey Poznyakoff@c This file is distributed under GFDL 1.1 or any later version@c published by the Free Software Foundation.  Incremental archives keep information about contents of eachdumped directory in special data blocks called @dfn{dumpdirs}.  Dumpdir is a sequence of entries of the following form:@smallexample@var{C} @var{filename} \0@end smallexample@noindentwhere @var{C} is one of the @dfn{control codes} described below,@var{filename} is the name of the file @var{C} operates upon, and@samp{\0} represents a nul character (ASCII 0).  The white space characters were added for readability, real dumpdirs do not containthem.  Each dumpdir ends with a single nul character.  The following table describes control codes and their meanings:@table @samp@item Y@var{filename} is contained in the archive.@item N@var{filename} was present in the directory at the time the archivewas made, yet it was not dumped to the archive, because it had notchanged since the last backup.@item D@var{filename} is a directory.@item RThis code requests renaming of the @var{filename} to the namespecified with the @samp{T} command, that immediately follows it.@item TSpecify target file name for @samp{R} command (see below).@item XSpecify @dfn{temporary directory} name for a rename operation (see below).@end table  Codes @samp{Y}, @samp{N} and @samp{D} require @var{filename} argumentto be a relative file name to the directory this dumpdir describes,whereas codes @samp{R}, @samp{T} and @samp{X} require their argumentto be an absolute file name. The three codes @samp{R}, @samp{T} and @samp{X} specify a@dfn{renaming operation}.  In the simplest case it is:@smallexampleR@file{source}\0T@file{dest}\0@end smallexample@noindentwhich means ``rename file @file{source} to file @file{dest}''.  However, there are cases that require using a @dfn{temporarydirectory}.  For example, consider the following scenario:@enumerate 1@itemPrevious run dumped a directory @file{foo} which contained thefollowing three directories: @smallexampleabc@end smallexample@itemThey were renamed @emph{cyclically}, so that:@example@file{a} became @file{b}@file{b} became @file{c}@file{c} became @file{a}@end example@itemNew incremental dump was made.@end enumerate  This case cannot be handled by three successive renames, sincerenaming @file{a} to @file{b} will destroy the existing directory.To correctly process it, @GNUTAR{} needs a temporary directory, soit creates the following dumpdir (newlines have been added forreadability): @smallexample@groupXfoo\0Rfoo/a\0T\0Rfoo/b\0Tfoo/c\0Rfoo/c\0Tfoo/a\0R\0Tfoo/a\0@end group@end smallexample  The first command, @samp{Xfoo\0}, instructs the extractor to create atemporary directory in the directory @file{foo}.  Second command,@samp{Rfoo/aT\0}, says ``rename file @file{foo/a} to the temporarydirectory that has just been created'' (empty file name after acommand means use temporary directory).  Third and fourth commandswork as usual, and, finally, the last command, @samp{R\0Tfoo/a\0}tells tar to rename the temporary directory to @file{foo/a}.  The exact placement of a dumpdir in the archive depends on thearchive format (@pxref{Formats}): @itemize@item PAX archivesIn PAX archives, dumpdir is stored in the extended header of thecorresponding directory, in variable @code{GNU.dumpdir}.@item GNU and old GNU archivesThese formats implement special header type @samp{D}, which is similarto ustar header @samp{5} (directory), except that it precedes a datablock containing the dumpdir.@end itemize@c End of dumpdir.texi

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?