3 d93fca6a 2005-02-11 devnull tar \- archiver
4 d93fca6a 2005-02-11 devnull .SH SYNOPSIS
8 d93fca6a 2005-02-11 devnull .I file ...
10 d93fca6a 2005-02-11 devnull .SH DESCRIPTION
13 d93fca6a 2005-02-11 devnull saves and restores file trees.
14 d93fca6a 2005-02-11 devnull It is most often used to transport a tree of files from one
15 d93fca6a 2005-02-11 devnull system to another.
18 d93fca6a 2005-02-11 devnull is a string that contains
19 d93fca6a 2005-02-11 devnull at most one function letter plus optional modifiers.
20 d93fca6a 2005-02-11 devnull Other arguments to the command are names of
21 d93fca6a 2005-02-11 devnull files or directories to be dumped or restored.
22 d93fca6a 2005-02-11 devnull A directory name implies all the contained
23 d93fca6a 2005-02-11 devnull files and subdirectories (recursively).
25 d93fca6a 2005-02-11 devnull The function is one of the following letters:
28 d93fca6a 2005-02-11 devnull Create a new archive with the given files as contents.
31 d93fca6a 2005-02-11 devnull The named files
32 d93fca6a 2005-02-11 devnull are appended to the archive.
35 d93fca6a 2005-02-11 devnull List all occurrences of each
37 d93fca6a 2005-02-11 devnull in the archive, or of all files if there are no
39 d93fca6a 2005-02-11 devnull arguments.
42 d93fca6a 2005-02-11 devnull Extract the named files from the archive.
43 d93fca6a 2005-02-11 devnull If a file is a directory, the directory is extracted recursively.
44 d93fca6a 2005-02-11 devnull Modes are restored if possible.
45 d93fca6a 2005-02-11 devnull If no file argument is given, extract the entire archive.
46 d93fca6a 2005-02-11 devnull If the archive contains multiple entries for a file,
47 d93fca6a 2005-02-11 devnull the latest one wins.
49 d93fca6a 2005-02-11 devnull The modifiers are:
52 d93fca6a 2005-02-11 devnull Use the next argument as the name of the archive instead of
53 d93fca6a 2005-02-11 devnull the default standard input (for keys
57 d93fca6a 2005-02-11 devnull or standard output (for keys
63 d93fca6a 2005-02-11 devnull Use the next (numeric) argument as the group id for files in
64 d93fca6a 2005-02-11 devnull the output archive.
68 d93fca6a 2005-02-11 devnull Modifies the behavior of
70 d93fca6a 2005-02-11 devnull not to extract files which already exist.
73 d93fca6a 2005-02-11 devnull Do not set the modification time on extracted files.
74 d93fca6a 2005-02-11 devnull This is the default behavior; the flag exists only for compatibility with other tars.
77 d93fca6a 2005-02-11 devnull Create archive in POSIX ustar format,
78 d93fca6a 2005-02-11 devnull which raises the maximum pathname length from 100 to 256 bytes.
79 d93fca6a 2005-02-11 devnull Ustar archives are recognised automatically by
81 d93fca6a 2005-02-11 devnull when reading archives.
82 d93fca6a 2005-02-11 devnull This is the default behavior; the flag exists only for backwards compatibility
83 d93fca6a 2005-02-11 devnull with older versions of tar.
86 d93fca6a 2005-02-11 devnull Do not generate the POSIX ustar format.
89 d93fca6a 2005-02-11 devnull When extracting, ignore leading slash on file names,
90 d93fca6a 2005-02-11 devnull i.e., extract all files relative to the current directory.
93 d93fca6a 2005-02-11 devnull Modifies the behavior of
95 d93fca6a 2005-02-11 devnull to set the modified time
96 d93fca6a 2005-02-11 devnull of each file to that specified in the archive.
99 d93fca6a 2005-02-11 devnull Use the next (numeric) argument as the user id for files in
100 d93fca6a 2005-02-11 devnull the output archive. This is only useful when moving files to
101 d93fca6a 2005-02-11 devnull a non-Plan 9 system.
104 d93fca6a 2005-02-11 devnull (verbose)
105 d93fca6a 2005-02-11 devnull Print the name of each file treated
106 d93fca6a 2005-02-11 devnull preceded by the function letter.
109 d93fca6a 2005-02-11 devnull give more details about the
110 d93fca6a 2005-02-11 devnull archive entries.
113 d93fca6a 2005-02-11 devnull Operate on compressed tar archives.
114 d93fca6a 2005-02-11 devnull The type of compression is inferred from the file name extension:
115 d93fca6a 2005-02-11 devnull .IR gzip (1)
117 d93fca6a 2005-02-11 devnull .B .tar.gz
119 d93fca6a 2005-02-11 devnull .BR .tgz ;
120 d93fca6a 2005-02-11 devnull .I bzip2
122 d93fca6a 2005-02-11 devnull .IR gzip (1))
124 d93fca6a 2005-02-11 devnull .BR .tar.bz ,
125 d93fca6a 2005-02-11 devnull .BR .tbz ,
126 d93fca6a 2005-02-11 devnull .BR .tar.bz2 ,
128 d93fca6a 2005-02-11 devnull .BR .tbz2 ;
129 d93fca6a 2005-02-11 devnull .I compress
130 d93fca6a 2005-02-11 devnull (not distributed)
132 d93fca6a 2005-02-11 devnull .B .tar.Z
134 d93fca6a 2005-02-11 devnull .BR .tz .
135 d93fca6a 2005-02-11 devnull If no extension matches,
137 d93fca6a 2005-02-11 devnull is used.
140 d93fca6a 2005-02-11 devnull flag is unnecessary (but allowed) when using the
144 d93fca6a 2005-02-11 devnull verbs on archives with recognized extensions.
145 d93fca6a 2005-02-11 devnull .SH EXAMPLES
147 d93fca6a 2005-02-11 devnull can be used to copy hierarchies thus:
150 d93fca6a 2005-02-11 devnull @{cd fromdir && tar cp .} | @{cd todir && tar xT}
152 d93fca6a 2005-02-11 devnull .SH SOURCE
153 d93fca6a 2005-02-11 devnull .B \*9/src/cmd/tar.c
154 d93fca6a 2005-02-11 devnull .SH SEE ALSO
157 83c4506a 2005-02-11 devnull .IR 9c (1),
158 d93fca6a 2005-02-11 devnull .IR bundle (1)
159 d93fca6a 2005-02-11 devnull .SH BUGS
160 d93fca6a 2005-02-11 devnull There is no way to ask for any but the last
161 d93fca6a 2005-02-11 devnull occurrence of a file.
163 d93fca6a 2005-02-11 devnull File path names are limited to
164 d93fca6a 2005-02-11 devnull 100 characters
165 d93fca6a 2005-02-11 devnull (256 when using ustar format).
167 d93fca6a 2005-02-11 devnull The tar format allows specification of links and symbolic links,
168 d93fca6a 2005-02-11 devnull concepts foreign to Plan 9: they are ignored.