Annotation of 43BSDReno/bin/tar/tar.1, revision 1.1.1.1

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