Annotation of 43BSDTahoe/man/man1/tar.1, revision 1.1.1.1

1.1       root        1: .\"    @(#)tar.1       6.6 (Berkeley) 5/23/88
                      2: .\"
                      3: .TH TAR 1 "May 23, 1988"
                      4: .AT 3
                      5: .SH NAME
                      6: tar \- tape archiver
                      7: .SH SYNOPSIS
                      8: .B tar
                      9: [ key ] [ name ... ]
                     10: .SH DESCRIPTION
                     11: .PP
                     12: .I Tar
                     13: saves and restores multiple files on a single file (usually a magnetic
                     14: tape, but it can be any file).  
                     15: .IR Tar 's
                     16: actions are controlled by the
                     17: .I key
                     18: argument.  The
                     19: .I key
                     20: is a string of characters containing at most one function letter and possibly
                     21: one or more function modifiers.  Other arguments to 
                     22: .I tar
                     23: are file or directory names specifying which files to dump or restore.
                     24: In all cases, appearance of a directory name refers to
                     25: the files and (recursively) subdirectories of that directory.
                     26: .PP
                     27: The function portion of the key is specified by one of the following letters:
                     28: .TP 8
                     29: .B r
                     30: The named files are written on the end of the tape.  The
                     31: .B c
                     32: function implies this.
                     33: .TP 8
                     34: .B x
                     35: The named files are extracted from the tape.  If the named file
                     36: matches a directory whose contents had been written onto the tape, this
                     37: directory is (recursively) extracted.  The owner, modification time, and mode
                     38: are restored (if possible).  If no file argument is given, the entire content
                     39: of the tape is extracted.  Note that if multiple entries specifying the same
                     40: file are on the tape, the last one overwrites all earlier.
                     41: .TP 8
                     42: .B t
                     43: The names of the specified files are listed each time they occur on
                     44: the tape.  If no file argument is given, all of the names on the tape
                     45: are listed.
                     46: .TP 8
                     47: .B u
                     48: The named files are added to the tape if either they are not
                     49: already there or have been modified since last put on the tape.
                     50: .TP 8
                     51: .B c
                     52: Create a new tape; writing begins on the beginning of the tape
                     53: instead of after the last file.  This command implies
                     54: .BR r .
                     55: .PP
                     56: The following characters may be used in addition to the letter
                     57: which selects the function desired.
                     58: .TP 10
                     59: .B o
                     60: On output, tar normally places information specifying owner and modes
                     61: of directories in the archive.  Former versions of tar, when encountering
                     62: this information will give error message of the form
                     63: .br
                     64:        "<name>/: cannot create".
                     65: .br
                     66: This modifier will suppress the directory information.
                     67: .TP 10
                     68: .B p
                     69: This modifier says to restore files to their original modes,
                     70: ignoring the present
                     71: .IR umask (2).
                     72: Setuid and sticky information
                     73: will also be restored to the super-user.
                     74: .TP 10
                     75: .B 0, ..., 9
                     76: This modifier selects an alternate drive on which the tape is mounted.
                     77: The default is drive 0 at 1600 bpi, which is normally /dev/rmt8.
                     78: .TP 10
                     79: .B v
                     80: Normally
                     81: .I tar
                     82: does its work silently.  The
                     83: .B v
                     84: (verbose) option makes
                     85: .I tar
                     86: print the name of each file it treats preceded by the function
                     87: letter.  With the
                     88: .B t
                     89: function, the verbose option
                     90: gives more information about the tape entries than just their names.
                     91: .TP 10
                     92: .B w
                     93: .I Tar
                     94: prints the action to be taken followed by file name, then
                     95: wait for user confirmation. If a word beginning with `y'
                     96: is given, the action is done. Any other input means don't do it.
                     97: .TP 10
                     98: .B f
                     99: .I Tar
                    100: uses the next argument as the name of the archive instead of
                    101: /dev/rmt?. If the name of the file is `\-', tar writes to standard output or
                    102: reads from standard input, whichever is appropriate. Thus,
                    103: .I tar
                    104: can be used as the head or tail of a filter chain.
                    105: .I Tar
                    106: can also be used to move hierarchies with the command
                    107: .ce 1
                    108: cd fromdir; tar cf - . | (cd todir; tar xf -)
                    109: .TP 10
                    110: .B b
                    111: .I Tar
                    112: uses the next argument as the blocking factor for tape records. The
                    113: default is 20 (the maximum). This option should only be used with raw magnetic
                    114: tape archives (See 
                    115: .B f
                    116: above).  The block size is determined automatically
                    117: when reading tapes (key letters `x' and `t').
                    118: .TP 10
                    119: .B s
                    120: tells tar to strip off any leading slashes from pathnames.
                    121: .TP 10
                    122: .B l
                    123: tells 
                    124: .I tar
                    125: to complain if it cannot resolve all of the links to the
                    126: files dumped.  If this is not specified, no error messages are printed.
                    127: .TP 10
                    128: .B m
                    129: tells 
                    130: .I tar
                    131: not to restore the modification times.  The modification time
                    132: will be the time of extraction.
                    133: .TP 10
                    134: .B h
                    135: Force 
                    136: .I tar
                    137: to follow symbolic links as if they were normal files or
                    138: directories.  Normally, 
                    139: .I tar
                    140: does not follow symbolic links.
                    141: .TP 10
                    142: .B B
                    143: Forces input and output blocking to 20 blocks per record.  This option
                    144: was added so that 
                    145: .I tar
                    146: can work across a communications channel where the blocking may not
                    147: be maintained.
                    148: .TP 10
                    149: .B C
                    150: If a file name is preceded by 
                    151: .BR \-C ,
                    152: then 
                    153: .I tar
                    154: will perform a
                    155: .IR chdir (2)
                    156: to that file name.  This allows multiple directories not
                    157: related by a close common parent to be archived using short
                    158: relative path names.  For example, to archive files from /usr/include
                    159: and from /etc, one might use
                    160: .ti +0.5i
                    161: tar c -C /usr include -C / etc
                    162: .PP
                    163: Previous restrictions dealing with
                    164: .IR tar 's
                    165: inability to properly handle blocked archives have been lifted.
                    166: .PP
                    167: .SH FILES
                    168: /dev/rmt?
                    169: .br
                    170: /tmp/tar*
                    171: .SH "SEE ALSO"
                    172: tar(5)
                    173: .SH DIAGNOSTICS
                    174: Complaints about bad key characters and tape read/write errors.
                    175: .br
                    176: Complaints if enough memory is not available to hold the link tables.
                    177: .SH BUGS
                    178: There is no way to ask for the
                    179: .IR n -th
                    180: occurrence of a file.
                    181: .br
                    182: Tape errors are handled ungracefully.
                    183: .br
                    184: The 
                    185: .B u
                    186: option can be slow.
                    187: .br
                    188: The current limit on file name length is 100 characters.
                    189: .br
                    190: There is no way selectively to follow symbolic links.
                    191: .br
                    192: When extracting tapes created with the
                    193: .B r
                    194: or
                    195: .B u
                    196: options, directory modification times may not be set correctly.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.