|
|
1.1 root 1: .TH TAR 1
2: .CT 1 comm_dev
3: .SH NAME
4: tar \- tape archiver
5: .SH SYNOPSIS
6: .B tar
7: .I key
8: [
9: .I file ...
10: ]
11: .SH DESCRIPTION
12: .PP
13: .I Tar
14: saves and restores files, normally on magnetic
15: on tape.
16: The
17: .I key
18: is a string that contains
19: at most one function letter plus optional modifiers.
20: Other arguments to the command are names of
21: files or directories to be dumped or restored.
22: A directory name implies all the contained
23: files and subdirectories (recursively).
24: .PP
25: The function is one of the following letters:
26: .TP
27: .B r
28: The named files
29: are written
30: on the end of the tape.
31: .TP
32: .B x
33: Extract the named files from the tape.
34: If a file is a directory, the directory is extracted recursively.
35: Owners and modes are restored if possible.
36: If no file argument is given, extract the entire tape.
37: If the tape contains multiple entries for a file,
38: the latest one wins.
39: .TP
40: .B t
41: List all occurrences of each
42: .I file
43: on tape, or of all files if there are no
44: .I file
45: arguments.
46: .TP
47: .B u
48: Add the named files if they
49: are not on the tape or are newer than the tape version.
50: .TP
51: .B c
52: Create a new tape; writing begins at the beginning
53: of the tape instead of after the last file.
54: .TP
55: .B o
56: Omit owner and modes
57: of directories, for compatibility with
58: old versions of
59: .I tar.
60: .TP
61: .B p
62: Restore files to their original modes,
63: ignoring the present
64: .IR umask (2).
65: Setuid and sticky information
66: will be restored when
67: .IR tar
68: is executed by the super-user.
69: .PP
70: The modifiers are:
71: .TP
72: .BR 0 ,..., 7
73: Select a tape drive.
74: The default is
75: .BR 1 .
76: Incompatible with modifier
77: .BR f .
78: .TP
79: .B v
80: (verbose)
81: Print the name of each file treated
82: preceded by the function letter.
83: With
84: .BR t ,
85: give more details about the
86: tape entries.
87: .TP
88: .B w
89: Print the action to be taken followed by file name, then
90: wait for user confirmation.
91: If the answer begins with
92: .LR y ,
93: the action is performed.
94: Any other input means
95: don't do it.
96: .TP
97: .B f
98: Use the next argument as the name of the archive instead of
99: the default
100: .F /dev/rmt1 .
101: If the name of the file is
102: .LR - ,
103: tar writes to
104: standard output or reads from standard input, whichever is
105: appropriate.
106: .I Tar
107: can be used to move hierarchies thus:
108: .IP
109: .L
110: (cd fromdir; tar cf - .) | (cd todir; tar xf -)
111: .TP
112: .BI b
113: Write output in
114: .IR n \(mu512-byte
115: blocks, where
116: .I n
117: is the next argument,
118: default 20, maximum 40.
119: Useful for raw magnetic tape archives (see
120: .B f
121: above); destructive for disk archives.
122: .TP
123: .B l
124: Complain if links cannot be resolved.
125: If
126: .B l
127: is not specified, no
128: error messages are printed.
129: .TP
130: .B L
131: Write information needed to re-create symbolic links
132: on the tape instead of following the links.
133: Tapes thus written cannot be read on older versions of
134: .I tar .
135: .SH FILES
136: .F /dev/rmt?
137: .br
138: .F /tmp/tar*
139: .SH SEE ALSO
140: .IR cpio (1),
141: .IR bundle (1),
142: .IR mt (4)
143: .SH BUGS
144: There is no way to ask for any but the last
145: occurrence of a file.
146: .br
147: Tape errors are handled ungracefully.
148: .br
149: The
150: .B u
151: option can be slow, and works only with archives on disk files.
152: .br
153: File names are limited to
154: 100 characters.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.