16 saves and restores file trees.
17 It is most often used to transport a tree of files from one
21 is a string that contains
22 at most one function letter plus optional modifiers.
23 Other arguments to the command are names of
24 files or directories to be dumped or restored.
25 A directory name implies all the contained
26 files and subdirectories (recursively).
28 The function is one of the following letters:
31 Create a new archive with the given files as contents.
35 are appended to the archive.
38 List all occurrences of each
40 in the archive, or of all files if there are no
45 Extract the named files from the archive.
46 If a file is a directory, the directory is extracted recursively.
47 Modes are restored if possible.
48 If no file argument is given, extract the entire archive.
49 If the archive contains multiple entries for a file,
55 Use the next argument as the name of the archive instead of
56 the default standard input (for keys
60 or standard output (for keys
66 Use the next (numeric) argument as the group id for files in
70 Ignore errors encountered when reading.
71 Errors writing either produce a corrupt archive
72 or indicate deeper file system problems.
76 Modifies the behavior of
78 not to extract files which already exist.
81 Do not set the modification time on extracted files.
82 This is the default behavior; the flag exists only for compatibility with other tars.
85 Create archive in POSIX ustar format,
86 which raises the maximum pathname length from 100 to 256 bytes.
87 Ustar archives are recognised automatically by
89 when reading archives.
90 This is the default behavior; the flag exists only for backwards compatibility
91 with older versions of tar.
94 Do not generate the POSIX ustar format.
97 When extracting, respect leading slash on file names.
98 By default, files are always extracted relative to the current directory.
101 When extracting, attempt to resynchronise after not finding a tape header
102 block where expected.
105 Modifies the behavior of
107 to set the modified time,
108 mode and, for POSIX archives and filesystem permitting,
110 of each file to that specified in the archive.
113 Use the next (numeric) argument as the user id for files in
114 the output archive. This is only useful when moving files to
119 Print the name of each file as it is processed.
122 give more details about the
126 Operate on compressed
129 The type of compression is inferred from the file name extension:
149 If no extension matches,
154 flag is unnecessary (but allowed) when using the
158 verbs on archives with recognized extensions.
163 can be used to copy hierarchies thus:
166 @{cd fromdir && tar c .} | @{cd todir && tar xT}
172 .B /sys/src/cmd/tar.c
181 There is no way to ask for any but the last
182 occurrence of a file.
184 File path names are limited to
186 (256 when using ustar format).
190 format allows specification of links and symbolic links,
191 concepts foreign to Plan 9: they are ignored.
196 cannot be used on compressed archives.
201 doesn't record Plan-9-specific metadata
202 such as append-only and exclusive-open permission bits, so they aren't copied.