2 .\" Copyright (c) 1997 SigmaSoft, Th. Lockert
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
13 .\" 3. All advertising materials mentioning features or use of this software
14 .\" must display the following acknowledgement:
15 .\" This product includes software developed by SigmaSoft, Th. Lockert.
16 .\" 4. The name of the author may not be used to endorse or promote products
17 .\" derived from this software without specific prior written permission
19 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 .\" $OpenBSD: cpio.1,v 1.5 1998/09/14 22:13:52 aaron Exp $
37 .Nd copy file archives in and out
50 .Op Fl bBcdfjmrsStuvzZ6
61 .Ar destination-directory
66 command copies files to and from a
70 The following options are supported:
73 Create an archive. Reads the list of files to store in the
74 archive from standard input, and writes the archive on standard
78 Reset the access times on files that have been copied to the
81 Append to the specified archive.
83 Set block size of output to 5120 bytes.
87 header for portability.
89 Set the block size of output to
93 Use the specified file name as the archive to write to.
95 Write the archive in the specified format. Recognized
99 Old binary cpio format.
101 Old octal character cpio format.
103 SVR4 hex cpio format.
110 Compress archive using
114 Follow symbolic links.
116 Be verbose about operations. List filenames as they are
117 written to the archive.
119 Compress archive using
123 Compress archive using
128 Restore files from an archive. Reads the archive file from
129 standard input and extracts files matching the
131 that were specified on the command line.
134 Do byte and word swapping after reading in data from the
135 archive, for restoring archives created on systems with
136 a different byte order.
138 Set the block size of the archive being read to 5120 bytes.
140 Expect the archive headers to be in ASCII format.
142 Read archive written with a block size of
145 Create any intermediate directories as needed during
148 Read list of file name patterns to extract or list from
151 Restore all files except those matching the
153 given on the command line.
156 Use the specified file as the input for the archive.
158 Read an archive of the specified format. Recognized
162 Old binary cpio format.
164 Old octal character cpio format.
166 SVR4 hex cpio format.
173 Uncompress archive using
177 Restore modification times on files.
179 Rename restored files interactively.
181 Swap bytes after reading data from the archive.
183 Swap words after reading data from the archive.
185 Only list the contents of the archive, no files or
186 directories will be created.
188 Overwrite files even when the file in the archive is
189 older than the one that will be overwritten.
191 Be verbose about operations. List filenames as they are
192 copied in from the archive.
194 Uncompress archive using
198 Uncompress archive using
202 Process old-style \*Qcpio\*U format archives.
205 Copy files from one location to another in a single pass.
206 The list of files to copy are read from standard input and
207 written out to a directory relative to the specified
212 Reset the access times on files that have been copied.
214 Create any intermediate directories as needed to write
215 the files at the new location.
217 When possible, link files rather than creating an
220 Follow symbolic links.
222 Restore modification times on files.
224 Overwrite files even when the original file being copied is
225 older than the one that will be overwritten.
227 Be verbose about operations. List filenames as they are
233 will exit with one of the following values:
236 All files were processed successfully.
243 cannot create a file or a link when extracting an archive or cannot
244 find a file while writing an archive, or cannot preserve the user
245 ID, group ID, file mode or access and modification times when the
247 option is specified, a diagnostic message is written to standard
248 error and a non-zero exit value will be returned, but processing
249 will continue. In the case where
251 cannot create a link to a file,
253 will not create a second copy of the file.
255 If the extraction of a file from an archive is prematurely terminated
256 by a signal or error,
258 may have only partially extracted the file the user wanted.
259 Additionally, the file modes of extracted files and directories may
260 have incorrect file bits, and the modification and access times may
263 If the creation of an archive is prematurely terminated by a signal
266 may have only partially created the archive which may violate the
267 specific archive format specification.
276 options are currently not implemented.
278 Keith Muller at the University of California, San Diego.