Sergey Poznyakoff 19 年之前
父节点
当前提交
7bfcbd6a27
共有 3 个文件被更改,包括 135 次插入16 次删除
  1. 19 1
      NEWS
  2. 0 12
      TODO
  3. 116 3
      doc/tar.texi

+ 19 - 1
NEWS

@@ -53,10 +53,28 @@ with UNIX98.  This ends the transition period started with version 1.14.
   
   
 * New features
 * New features
 
 
+** New option --transform allows to transform file names before storing them
+in the archive or member names before extracting.  The option takes a
+sed replace expression as its argument.  For example,
+
+  tar cf foo.tar --transform 's,^,prefix/'
+
+will add 'prefix/' to all file names stored in foo.tar.
+
+** --strip-components option works when deleting and comparing.
+
+** New option --show-transformed-names enables display of transformed file
+or archive.  In particular, when creating archive in verbose mode,
+the option lists member names as stored in the archive.  It
+generalizes --show-stored-names option, introduced in 1.15.90.  In
+particular, when creating an archive in verbose mode, it lists member
+names as stored in the archive, i.e., with any eventual prefixes
+removed and file name transformations applied.  The option is useful,
+for example, while comparing `tar cv' and `tar tv' outputs.
+
 ** New incremental snapshot file format keeps information about file names 
 ** New incremental snapshot file format keeps information about file names 
 as well as that about directories.
 as well as that about directories.
 
 
-
 
 
 version 1.15.90 - Sergey Poznyakoff, 2006-02-19
 version 1.15.90 - Sergey Poznyakoff, 2006-02-19
 
 

+ 0 - 12
TODO

@@ -17,18 +17,6 @@ so that the GNU extensions (--incremental, --label and
 * Add support for a 'pax' command that conforms to POSIX 1003.1-2001.
 * Add support for a 'pax' command that conforms to POSIX 1003.1-2001.
   This would unify paxutils with tar.
   This would unify paxutils with tar.
 
 
-* Remove command-line incompatibilities between GNU tar and UNIX tar
-  as specified by UNIX98.  The main problem is:
-
-     l   GNU tar doesn't cross filesystem boundaries.
-	 UNIX98 tar warns if all links cannot be resolved.
-	   (GNU tar --check-links option)
-
-  Currently tar prints a warning when this option is used. Sometime
-  in the future its semantics will be changed to that of --check-links.
-  In the meanwhile we should announce a phase-in period where "l"
-  changes in semantics.
-
 * Interoperate better with Joerg Schilling's star implementation.
 * Interoperate better with Joerg Schilling's star implementation.
 
 
 * Add an option to remove files that compare successfully.
 * Add an option to remove files that compare successfully.

+ 116 - 3
doc/tar.texi

@@ -195,6 +195,7 @@ Advanced @GNUTAR{} Operations
 * concatenate::
 * concatenate::
 * delete::
 * delete::
 * compare::
 * compare::
+* quoting styles::
 
 
 How to Add Files to Existing Archives: @option{--append}
 How to Add Files to Existing Archives: @option{--append}
 
 
@@ -2593,7 +2594,7 @@ code. @xref{Writing to an External Program}.
 @opindex no-quote-chars, summary
 @opindex no-quote-chars, summary
 @item --no-quote-chars=@var{string}
 @item --no-quote-chars=@var{string}
 Do not quote characters from @var{string}, even if the selected
 Do not quote characters from @var{string}, even if the selected
-quoting style implies they should be quoted (@FIXME-pxref{Quoting Styles}).
+quoting style implies they should be quoted (@pxref{quoting styles}).
 
 
 @opindex no-recursion, summary
 @opindex no-recursion, summary
 @item --no-recursion
 @item --no-recursion
@@ -2715,12 +2716,12 @@ This option does not affect extraction from archives.
 @opindex quote-chars, summary
 @opindex quote-chars, summary
 @item --quote-chars=@var{string}
 @item --quote-chars=@var{string}
 Always quote characters from @var{string}, even if the selected
 Always quote characters from @var{string}, even if the selected
-quoting style would not quote them (@FIXME-pxref{Quoting Styles}).
+quoting style would not quote them (@pxref{quoting styles}).
 
 
 @opindex quoting-style, summary
 @opindex quoting-style, summary
 @item --quoting-style=@var{style}
 @item --quoting-style=@var{style}
 Set quoting style to use when printing member and file names
 Set quoting style to use when printing member and file names
-(@FIXME-pxref{Quoting Styles}). Valid @var{style} values are:
+(@pxref{quoting styles}). Valid @var{style} values are:
 @code{literal}, @code{shell}, @code{shell-always}, @code{c},
 @code{literal}, @code{shell}, @code{shell-always}, @code{c},
 @code{escape}, @code{locale}, and @code{clocale}. Default quoting
 @code{escape}, @code{locale}, and @code{clocale}. Default quoting
 style is @code{escape}, unless overridden while configuring the
 style is @code{escape}, unless overridden while configuring the
@@ -3670,6 +3671,7 @@ it still introduces the info in the chapter correctly : ).}
 * concatenate::
 * concatenate::
 * delete::
 * delete::
 * compare::
 * compare::
+* quoting styles::
 @end menu
 @end menu
 
 
 @node Operations
 @node Operations
@@ -4175,6 +4177,117 @@ The spirit behind the @option{--compare} (@option{--diff}, @option{-d}) option i
 archive represents the current state of files on disk, more than validating
 archive represents the current state of files on disk, more than validating
 the integrity of the archive media.  For this later goal, @xref{verify}.
 the integrity of the archive media.  For this later goal, @xref{verify}.
 
 
+@node quoting styles
+@subsection Quoting Member Names
+@UNREVISED{}
+
+@smallexample
+@group
+$ @kbd{ls}
+a\ttab
+a\nnewline
+a\ space
+a"double"quote
+a'single'quote
+a\\backslash
+$ @kbd{tar cf arch .}
+@end group
+@end smallexample
+
+@smallexample
+@group
+$ @kbd{tar tf arch --quoting-style=literal}
+./
+./a space
+./a'single'quote
+./a"double"quote
+./a\backslash
+./a	tab
+./a
+newline
+@end group
+@end smallexample
+
+@smallexample
+@group
+$ @kbd{tar tf arch --quoting-style=shell}
+./
+'./a space'
+'./a'\''single'\''quote'
+'./a"double"quote'
+'./a\backslash'
+'./a	tab'
+'./a
+newline'
+@end group
+@end smallexample
+
+@smallexample
+@group
+$ @kbd{tar tf arch --quoting-style=shell-always}
+'./'
+'./a space'
+'./a'\''single'\''quote'
+'./a"double"quote'
+'./a\backslash'
+'./a	tab'
+'./a
+newline'
+@end group
+@end smallexample
+
+@smallexample
+@group
+$ @kbd{tar tf arch --quoting-style=c}
+"./"
+"./a space"
+"./a'single'quote"
+"./a\"double\"quote"
+"./a\\backslash"
+"./a\ttab"
+"./a\nnewline"
+@end group
+@end smallexample
+
+@smallexample
+@group
+$ @kbd{tar tf arch --quoting-style=escape}
+./
+./a space
+./a'single'quote
+./a"double"quote
+./a\\backslash
+./a\ttab
+./a\nnewline
+@end group
+@end smallexample
+
+@smallexample
+@group
+$ @kbd{tar tf arch --quoting-style=locale}
+`./'
+`./a space'
+`./a\'single\'quote'
+`./a"double"quote'
+`./a\\backslash'
+`./a\ttab'
+`./a\nnewline'
+@end group
+@end smallexample
+
+@smallexample
+@group
+$ @kbd{tar tf arch --quoting-style=clocale}
+"./"
+"./a space"
+"./a'single'quote"
+"./a\"double\"quote"
+"./a\\backslash"
+"./a\ttab"
+"./a\nnewline"
+@end group
+@end smallexample
+
 @node create options
 @node create options
 @section Options Used by @option{--create}
 @section Options Used by @option{--create}