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