Print this page
OS-1626 tar -C support on extract would be nice


  26 \fBtar\fR r[BDeEFhilnqTvw@/[0-7]][bfk][j|J|z|Z] [\fIblocksize\fR] [\fItarfile\fR]
  27      [\fIsize\fR]
  28      {\fIfile\fR | \(miI \fIinclude-file\fR | \(miC \fIdirectory\fR \fIfile\fR}...
  29 .fi
  30 
  31 .LP
  32 .nf
  33 \fBtar\fR t[BeFhilnqTv[0-7]][fk][X...][j|J|z|Z] [\fItarfile\fR] [\fIsize\fR]
  34      [\fIexclude-file\fR]... {\fIfile\fR | \(miI \fIinclude-file\fR}...
  35 .fi
  36 
  37 .LP
  38 .nf
  39 \fBtar\fR u[BDeEFhilnqTvw@/[0-7]][bfk][j|J|z|Z] [\fIblocksize\fR] [\fItarfile\fR]
  40      [\fIsize\fR] \fIfile\fR...
  41 .fi
  42 
  43 .LP
  44 .nf
  45 \fBtar\fR x[BeFhilmnopqTvw@/[0-7]][fk][X...][j|J|z|Z] [\fItarfile\fR] [\fIsize\fR]
  46      [\fIexclude-file\fR]... [\fIfile\fR]...
  47 .fi
  48 
  49 .SH DESCRIPTION
  50 .sp
  51 .LP
  52 The \fBtar\fR command archives and extracts files to and from a single file
  53 called a \fItarfile\fR. A tarfile is usually a magnetic tape, but it can be any
  54 file. \fBtar\fR's actions are controlled by the \fIkey\fR argument. The
  55 \fIkey\fR is a string of characters containing exactly one function letter
  56 (\fBc\fR, \fBr\fR, \fBt\fR , \fBu\fR, or \fBx\fR) and zero or more function
  57 modifiers (letters or digits), depending on the function letter used. The
  58 \fIkey\fR string contains no SPACE characters. Function modifier arguments are
  59 listed on the command line in the same order as their corresponding function
  60 modifiers appear in the \fIkey\fR string.
  61 .sp
  62 .LP
  63 The \fB\(miI\fR \fIinclude-file\fR, \fB\(miC\fR \fIdirectory file\fR, and
  64 \fIfile\fR arguments specify which files or directories are to be archived or
  65 extracted. In all cases, appearance of a directory name refers to the files and
  66 (recursively) subdirectories of that directory. Arguments appearing within
  67 braces (\fB{ }\fR) indicate that one of the arguments must be specified.
  68 .SH OPERANDS
  69 .sp
  70 .LP
  71 The following operands are supported:
  72 .sp
  73 .ne 2
  74 .na
  75 \fB\fB\(miC\fR \fIdirectory file\fR\fR
  76 .ad
  77 .sp .6
  78 .RS 4n
  79 Performs a \fBchdir\fR (see \fBcd\fR(1)) operation on \fIdirectory\fR and
  80 performs the \fBc\fR (create) or \fBr\fR (replace) operation on \fIfile\fR. Use
  81 short relative path names for \fIfile\fR. If \fIfile\fR is "\fB\&.\fR", archive
  82 all files in \fIdirectory\fR. This operand enables archiving files from
  83 multiple directories not related by a close common parent.




  84 .RE
  85 
  86 .sp
  87 .ne 2
  88 .na
  89 \fB\fB\(miI\fR \fIinclude-file\fR\fR
  90 .ad
  91 .sp .6
  92 .RS 4n
  93 Opens \fIinclude-file\fR containing a list of files, one per line, and treats
  94 it as if each file appeared separately on the command line. Be careful of
  95 trailing white spaces. Also beware of leading white spaces, since, for each
  96 line in the included file, the entire line (apart from the newline) is used to
  97 match against the initial string of files to include. In the case where
  98 excluded files (see \fBX\fR function modifier) are also specified, they take
  99 precedence over all included files. If a file is specified in both the
 100 \fIexclude-file\fR and the \fIinclude-file\fR (or on the command line), it is
 101 excluded.
 102 .RE
 103 




  26 \fBtar\fR r[BDeEFhilnqTvw@/[0-7]][bfk][j|J|z|Z] [\fIblocksize\fR] [\fItarfile\fR]
  27      [\fIsize\fR]
  28      {\fIfile\fR | \(miI \fIinclude-file\fR | \(miC \fIdirectory\fR \fIfile\fR}...
  29 .fi
  30 
  31 .LP
  32 .nf
  33 \fBtar\fR t[BeFhilnqTv[0-7]][fk][X...][j|J|z|Z] [\fItarfile\fR] [\fIsize\fR]
  34      [\fIexclude-file\fR]... {\fIfile\fR | \(miI \fIinclude-file\fR}...
  35 .fi
  36 
  37 .LP
  38 .nf
  39 \fBtar\fR u[BDeEFhilnqTvw@/[0-7]][bfk][j|J|z|Z] [\fIblocksize\fR] [\fItarfile\fR]
  40      [\fIsize\fR] \fIfile\fR...
  41 .fi
  42 
  43 .LP
  44 .nf
  45 \fBtar\fR x[BeFhilmnopqTvw@/[0-7]][fk][X...][j|J|z|Z] [\fItarfile\fR] [\fIsize\fR]
  46      [\fIexclude-file\fR]... [\(miC \fIdirectory\fR] [\fIfile\fR]...
  47 .fi
  48 
  49 .SH DESCRIPTION
  50 .sp
  51 .LP
  52 The \fBtar\fR command archives and extracts files to and from a single file
  53 called a \fItarfile\fR. A tarfile is usually a magnetic tape, but it can be any
  54 file. \fBtar\fR's actions are controlled by the \fIkey\fR argument. The
  55 \fIkey\fR is a string of characters containing exactly one function letter
  56 (\fBc\fR, \fBr\fR, \fBt\fR , \fBu\fR, or \fBx\fR) and zero or more function
  57 modifiers (letters or digits), depending on the function letter used. The
  58 \fIkey\fR string contains no SPACE characters. Function modifier arguments are
  59 listed on the command line in the same order as their corresponding function
  60 modifiers appear in the \fIkey\fR string.
  61 .sp
  62 .LP
  63 The \fB\(miI\fR \fIinclude-file\fR, \fB\(miC\fR \fIdirectory file\fR, and
  64 \fIfile\fR arguments specify which files or directories are to be archived or
  65 extracted. In all cases, appearance of a directory name refers to the files and
  66 (recursively) subdirectories of that directory. Arguments appearing within
  67 braces (\fB{ }\fR) indicate that one of the arguments must be specified.
  68 .SH OPERANDS
  69 .sp
  70 .LP
  71 The following operands are supported:
  72 .sp
  73 .ne 2
  74 .na
  75 \fB\fB\(miC\fR \fIdirectory file\fR\fR
  76 .ad
  77 .sp .6
  78 .RS 4n
  79 Performs a \fBchdir\fR (see \fBcd\fR(1)) operation on \fIdirectory\fR and
  80 performs the \fBc\fR (create) or \fBr\fR (replace) operation on \fIfile\fR. Use
  81 short relative path names for \fIfile\fR. If \fIfile\fR is "\fB\&.\fR", archive
  82 all files in \fIdirectory\fR. This operand enables archiving files from
  83 multiple directories not related by a close common parent.
  84 .sp
  85 This option may also be passed once to \fBx\fR (extract).  In this case the
  86 program will \fBchdir\fR to \fIdirectory\fR after opening the archive, but
  87 before extracting its contents.
  88 .RE
  89 
  90 .sp
  91 .ne 2
  92 .na
  93 \fB\fB\(miI\fR \fIinclude-file\fR\fR
  94 .ad
  95 .sp .6
  96 .RS 4n
  97 Opens \fIinclude-file\fR containing a list of files, one per line, and treats
  98 it as if each file appeared separately on the command line. Be careful of
  99 trailing white spaces. Also beware of leading white spaces, since, for each
 100 line in the included file, the entire line (apart from the newline) is used to
 101 match against the initial string of files to include. In the case where
 102 excluded files (see \fBX\fR function modifier) are also specified, they take
 103 precedence over all included files. If a file is specified in both the
 104 \fIexclude-file\fR and the \fIinclude-file\fR (or on the command line), it is
 105 excluded.
 106 .RE
 107