tar: Selecting Archive Members

1 
1 6.2 Selecting Archive Members
1 =============================
1 
1 "File Name arguments" specify which files in the file system 'tar'
1 operates on, when creating or adding to an archive, or which archive
1 members 'tar' operates on, when reading or deleting from an archive.
1 ⇒Operations.
1 
1    To specify file names, you can include them as the last arguments on
1 the command line, as follows:
1      tar OPERATION [OPTION1 OPTION2 ...] [FILE NAME-1 FILE NAME-2 ...]
1 
1    If a file name begins with dash ('-'), precede it with '--add-file'
1 option to prevent it from being treated as an option.
1 
1    By default GNU 'tar' attempts to "unquote" each file or member name,
1 replacing "escape sequences" according to the following table:
1 
1 Escape         Replaced with
1 -----------------------------------------------------------
1 \a             Audible bell (ASCII 7)
1 \b             Backspace (ASCII 8)
1 \f             Form feed (ASCII 12)
1 \n             New line (ASCII 10)
1 \r             Carriage return (ASCII 13)
1 \t             Horizontal tabulation (ASCII 9)
1 \v             Vertical tabulation (ASCII 11)
1 \?             ASCII 127
1 \N             ASCII N (N should be an octal number of
1                up to 3 digits)
1 
1    A backslash followed by any other symbol is retained.
1 
1    This default behavior is controlled by the following command line
1 option:
1 
1 '--unquote'
1      Enable unquoting input file or member names (default).
1 
1 '--no-unquote'
1      Disable unquoting input file or member names.
1 
1    If you specify a directory name as a file name argument, all the
1 files in that directory are operated on by 'tar'.
1 
1    If you do not specify files, 'tar' behavior differs depending on the
1 operation mode as described below:
1 
1    When 'tar' is invoked with '--create' ('-c'), 'tar' will stop
1 immediately, reporting the following:
1 
1      $ tar cf a.tar
1      tar: Cowardly refusing to create an empty archive
1      Try 'tar --help' or 'tar --usage' for more information.
1 
1    If you specify either '--list' ('-t') or '--extract' ('--get', '-x'),
1 'tar' operates on all the archive members in the archive.
1 
1    If run with '--diff' option, tar will compare the archive with the
1 contents of the current working directory.
1 
1    If you specify any other operation, 'tar' does nothing.
1 
1    By default, 'tar' takes file names from the command line.  However,
1 there are other ways to specify file or member names, or to modify the
1 manner in which 'tar' selects the files or members upon which to
1 operate.  In general, these methods work both for specifying the names
1 of files and archive members.
1