|
|
1.1 root 1: .TH TAR 1
2: .SH NAME
3: tar \- archiver
4: .SH SYNOPSIS
5: .B tar
6: .I key
7: [
8: .I file ...
9: ]
10: .SH DESCRIPTION
11: .PP
12: .I Tar
13: saves and restores file trees.
14: It is most often used to transport a tree of files from one
15: system to another.
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 c
28: Create a new archive with the given files as contents.
29: .TP
30: .B x
31: Extract the named files from the archive.
32: If a file is a directory, the directory is extracted recursively.
33: Modes are restored if possible.
34: If no file argument is given, extract the entire archive.
35: If the archive contains multiple entries for a file,
36: the latest one wins.
37: .TP
38: .B t
39: List all occurrences of each
40: .I file
41: in the archive, or of all files if there are no
42: .I file
43: arguments.
44: .TP
45: .B r
46: The named files
47: are appended to the archive.
48: .PP
49: The modifiers are:
50: .TP
51: .B v
52: (verbose)
53: Print the name of each file treated
54: preceded by the function letter.
55: With
56: .BR t ,
57: give more details about the
58: archive entries.
59: .TP
60: .B f
61: Use the next argument as the name of the archive instead of
62: the default standard input (for keys
63: .B x
64: and
65: .BR t )
66: or standard output (for keys
67: .B c
68: and
69: .BR r ).
70: .TP
71: .B u
72: Use the next (numeric) argument as the user id for files in
73: the output archive. This is only useful when moving files to
74: a non-Plan 9 system.
75: .TP
76: .B g
77: Use the next (numeric) argument as the group id for files in
78: the output archive.
79: .SH EXAMPLES
80: .I Tar
81: can be used to copy hierarchies thus:
82: .IP
83: .EX
84: {cd fromdir; tar c .} | {cd todir; tar x}
85: .EE
86: .SH SOURCE
87: .B /sys/src/cmd/tar.c
88: .SH SEE ALSO
89: .IR ar (1),
90: .IR bundle (1),
91: .IR tapefs (1)
92: .SH BUGS
93: There is no way to ask for any but the last
94: occurrence of a file.
95: .br
96: File path names are limited to
97: 100 characters.
98: .br
99: The tar format allows specification of links and symbolic links,
100: concepts foreign to Plan 9: they are ignored.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.