Print this page
3474 tar should support -C on extract
Reviewed by: Robert Mustacchi <rm@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man1/tar.1
          +++ new/usr/src/man/man1/tar.1
   1    1  '\" te
   2    2  .\" Copyright 1989 AT&T
   3    3  .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
   4    4  .\" Copyright 2012 Milan Jurik. All rights reserved.
        5 +.\" Copyright (c) 2013, Joyent, Inc. All rights reserved.
   5    6  .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
   6    7  .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
   7    8  .\" http://www.opengroup.org/bookstore/.
   8    9  .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
   9   10  .\"  This notice shall appear on any product containing this material.
  10   11  .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
  11   12  .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
  12   13  .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
  13      -.TH TAR 1 "May 9, 2012"
       14 +.TH TAR 1 "Jan 16, 2013"
  14   15  .SH NAME
  15   16  tar \- create tape archives and add or extract files
  16   17  .SH SYNOPSIS
  17   18  .LP
  18   19  .nf
  19   20  \fBtar\fR c[BDeEFhilnopPqTvw@/[0-7]][bfk][X...][a|j|J|z|Z] [\fIblocksize\fR]
  20   21       [\fItarfile\fR] [\fIsize\fR] [\fIexclude-file\fR]...
  21   22       {\fIfile\fR | \(miI \fIinclude-file\fR | \(miC \fIdirectory\fR \fIfile\fR}...
  22   23  .fi
  23   24  
↓ open down ↓ 12 lines elided ↑ open up ↑
  36   37  
  37   38  .LP
  38   39  .nf
  39   40  \fBtar\fR u[BDeEFhilnqTvw@/[0-7]][bfk][j|J|z|Z] [\fIblocksize\fR] [\fItarfile\fR]
  40   41       [\fIsize\fR] \fIfile\fR...
  41   42  .fi
  42   43  
  43   44  .LP
  44   45  .nf
  45   46  \fBtar\fR x[BeFhilmnopqTvw@/[0-7]][fk][X...][j|J|z|Z] [\fItarfile\fR] [\fIsize\fR]
  46      -     [\fIexclude-file\fR]... [\fIfile\fR]...
       47 +     [\fIexclude-file\fR]... [\(miC \fIdirectory\fR] [\fIfile\fR]...
  47   48  .fi
  48   49  
  49   50  .SH DESCRIPTION
  50   51  .sp
  51   52  .LP
  52   53  The \fBtar\fR command archives and extracts files to and from a single file
  53   54  called a \fItarfile\fR. A tarfile is usually a magnetic tape, but it can be any
  54   55  file. \fBtar\fR's actions are controlled by the \fIkey\fR argument. The
  55   56  \fIkey\fR is a string of characters containing exactly one function letter
  56   57  (\fBc\fR, \fBr\fR, \fBt\fR , \fBu\fR, or \fBx\fR) and zero or more function
↓ open down ↓ 17 lines elided ↑ open up ↑
  74   75  .na
  75   76  \fB\fB\(miC\fR \fIdirectory file\fR\fR
  76   77  .ad
  77   78  .sp .6
  78   79  .RS 4n
  79   80  Performs a \fBchdir\fR (see \fBcd\fR(1)) operation on \fIdirectory\fR and
  80   81  performs the \fBc\fR (create) or \fBr\fR (replace) operation on \fIfile\fR. Use
  81   82  short relative path names for \fIfile\fR. If \fIfile\fR is "\fB\&.\fR", archive
  82   83  all files in \fIdirectory\fR. This operand enables archiving files from
  83   84  multiple directories not related by a close common parent.
       85 +.sp
       86 +This option may also be passed once to \fBx\fR (extract).  In this case the
       87 +program will \fBchdir\fR to \fIdirectory\fR after opening the archive, but
       88 +before extracting its contents.
  84   89  .RE
  85   90  
  86   91  .sp
  87   92  .ne 2
  88   93  .na
  89   94  \fB\fB\(miI\fR \fIinclude-file\fR\fR
  90   95  .ad
  91   96  .sp .6
  92   97  .RS 4n
  93   98  Opens \fIinclude-file\fR containing a list of files, one per line, and treats
↓ open down ↓ 1175 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX